Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 Registered (blaaskaak, 2 invisible), 19 Guests and 17 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
Gizmo 11670
Rick 7543
Ian 4099
Mark S 3969
ntdoc 3101
Sirdude 2041
jgeoff 1876
David Dreezer 1748
driv 1552
AllenAyres 1519
Latest Photos
Carrie - So Very
Testing
Test Photo
4TH of July at the river!
Test shots from D300 part 3
Topic Options
Rate This Topic
#214346 - 06/12/08 04:40 AM Clean up poll data
blaaskaak Online   content


Registered: 08/30/06
Posts: 1209
Loc: Breda, NL
I did a check for "orphan" polls, polls that are not linked to any post, and found myself a few.

If you have MySQL >= 4.1 you might want to have a look if you can clean up a little too:

Code:
SELECT POLL_BODY
FROM ubbt_POLL_DATA
WHERE POST_ID NOT
IN (
SELECT POST_ID
FROM ubbt_POSTS
)


This will show the poll questions of orphaned polls.

Code:
delete from ubbt_POLL_DATA where POST_ID not in (select POST_ID from ubbt_POSTS);
delete from ubbt_POLL_OPTIONS where POLL_ID not in (select POLL_ID from ubbt_POLL_DATA);
delete from ubbt_POLL_VOTES where POLL_ID not in (select POLL_ID from ubbt_POLL_DATA);


These 3 do the actual cleanup (polls, poll options and the votes). Change the ubbt_ prefix if you happen to have another one in use.
_________________________

Top
#214352 - 06/12/08 07:23 AM Re: Clean up poll data [Re: blaaskaak]
Sirdude Moderator Offline


Registered: 04/19/07
Posts: 2041
Loc: SoCal, USA
should be added to content rebuilder

good stuff Yarp™-UNiT
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top
#214370 - 06/12/08 01:33 PM Re: Clean up poll data [Re: Sirdude]
blaaskaak Online   content


Registered: 08/30/06
Posts: 1209
Loc: Breda, NL
Originally Posted By: Sirdude
should be added to content rebuilder


and more cleanup stuff.

Time for threads requiring mysql 4.1 laugh
_________________________

Top
#214374 - 06/12/08 02:45 PM Re: Clean up poll data [Re: blaaskaak]
ntdoc Offline


Registered: 11/08/06
Posts: 3101
Originally Posted By: blaaskaak
Time for threads requiring mysql 4.1 laugh


Well they're already on version 5.0 and have 5.1RC as well as current work on 6.x Alpha. Now that Sun owns MySQL hopefully it remains FREE and who knows maybe the build and test phases may come sooner between builds.

http://dev.mysql.com/downloads/

.

Top


Shout Box

Recent Topics
Import UBB classic from to UBB threads runs on a new server
by Hari Varma
Today at 06:30 AM
Import UBB classic 6.7.2 to UBB threads 7.3.1
by MrVasu
Today at 12:44 AM
File Attachment problem
by Murphdog
Yesterday at 07:44 PM
group_foumperms.php Hangs
by mmem700
Yesterday at 05:58 AM
What causes this message to pop up?
by Larry Miller
Yesterday at 04:13 AM
Forum Stats
4010 Members
33 Forums
30825 Topics
156535 Posts

Max Online: 978 @ 06/24/07 08:19 PM