Previous Thread
Next Thread
Print Thread
Hop To
Clean up poll data #214346 06/12/2008 6:40 AM
Joined: Aug 2006
Posts: 1,356
Yarpâ„¢ Offline OP
veteran
OP Offline
veteran
Joined: Aug 2006
Posts: 1,356
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.


[Linked Image from siemons.org]
Re: Clean up poll data [Re: Yarpâ„¢] #214352 06/12/2008 9:23 AM
Joined: Apr 2007
Posts: 3,938
SD Offline
Former Developer
Offline
Former Developer
Joined: Apr 2007
Posts: 3,938
should be added to content rebuilder

good stuff Yarp™-UNiT

Re: Clean up poll data [Re: SD] #214370 06/12/2008 3:33 PM
Joined: Aug 2006
Posts: 1,356
Yarpâ„¢ Offline OP
veteran
OP Offline
veteran
Joined: Aug 2006
Posts: 1,356
Originally Posted by Sirdude
should be added to content rebuilder


and more cleanup stuff.

Time for threads requiring mysql 4.1 laugh


[Linked Image from siemons.org]
Re: Clean up poll data [Re: Yarpâ„¢] #214374 06/12/2008 4:45 PM
Joined: Nov 2006
Posts: 3,090
ntdoc Offline
Carpal Tunnel
Offline
Carpal Tunnel
Joined: Nov 2006
Posts: 3,090
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/

.


Link Copied to Clipboard
Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Subscriptions Question
by Ruben - 01/14/2020 12:11 PM
Page won't load after 7.7.3 Update
by Jim0421 - 01/08/2020 11:11 AM
Ubb 7.7.3 winkey emoji shortcut issue
by Ruben - 01/07/2020 4:04 PM
testing winkey emoji shortcut
by Ruben - 01/06/2020 2:36 PM
Very strange problem
by Baldeagle - 01/05/2020 1:22 PM
Who's Online Now
0 members (), 71 guests, and 381 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20200106)