Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
1 registered (1 invisible), 26 Guests and 19 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 11/02/08
Posts: 2
Top Posters (30 Days)
Ruben Rocha 165
Rick 116
Gizmo 105
Thelockman 61
driv 50
AllenAyres 35
ScriptKeeper 34
Mark S 30
Ian 30
phoebe 25
Latest Photos
My Home System
test photo gallery
Bernese Mountain Dogs
My Daimler
Dorado and shark
Topic Options
Rate This Topic
#214346 - 06/12/08 04:40 AM Clean up poll data
blaaskaak Offline

****

Registered: 08/30/06
Posts: 1294
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: 2066
Loc: SoCal, USA
should be added to content rebuilder

good stuff Yarp™-UNiT
_________________________


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

****

Registered: 08/30/06
Posts: 1294
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: 3193
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

Today's Birthdays
Eric Flyxe, mark_l_88@yahoo.com
Recent Topics
restricting a media tag to a single forum...
by bakerzdosen
Yesterday at 12:52 PM
Recover topics??
by femistyle
Yesterday at 12:22 PM
duplicate entries in viewmessage.php lang file (7.4.1)
by alnadabi
Yesterday at 05:54 AM
Order of variables in language files should be permanent
by alnadabi
Yesterday at 05:12 AM
How do I set Moderation Queue for an individual user?
by luket
11/20/08 11:28 AM
Forum Stats
4249 Members
33 Forums
30488 Topics
154661 Posts

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