The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Quick MYSQL Pruning Question...
Is there a simple mySQL query I can run on a message board (3.0.1) which will trim all of the messages from a particular forum APART from the first post?
Shame there isn't something in the admin prune options, but has anyone got a mySQL solution? |
#2
|
||||
|
||||
Let's say you want to delete from forum 18:
[sql] DELETE FROM post USING post,thread WHERE post.threadid = thread.threadid AND thread.forumid=18 AND post.postid != thread.firstpostid [/sql] This should do the trick - it will delete all posts in that forum, except the first post of each thread. WARNING: Although this query was tested, I don't guarantee anything, so be strongly advised to backup your data first! Furthermore you must rebuild threads afterwards, as otherwise you will see wrong figures in forumdisplay. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|