= 4.1 you might want to have a loo..."> = 4.1 you might want to have a loo...">
Previous Thread
Next Thread
Print Thread
Hop To
#214346 06/12/2008 7:40 AM
Joined: Aug 2006
Posts: 1,360
Likes: 2
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,360
Likes: 2
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]
Yarp #214352 06/12/2008 10:23 AM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
should be added to content rebuilder

good stuff Yarp™-UNiT

SD #214370 06/12/2008 4:33 PM
Joined: Aug 2006
Posts: 1,360
Likes: 2
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,360
Likes: 2
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]
Yarp #214374 06/12/2008 5:45 PM
Joined: Nov 2006
Posts: 3,097
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,097
Likes: 1
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
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
1 members (Gizmo), 156 guests, and 110 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)