The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Mysql query to delete posts form a specified forum
what is Mysql query to delete posts from a specified forum???
i try with this : DELETE FROM post WHERE post.threadid = thread.threadid AND thread.forumid = 49 but it returns to me a syntax error thank you very much :knockedout: :rambo: |
#2
|
||||
|
||||
You can not use joins if you want to delete threads. To delete properly you need to obtain the list of posts that belong to the thread in question. Then delete from the search index the entries that belong to the posts that belogn to that thread, then you can delete the thread. And this is assuming that there are no attachments in that thread...
Here is a quick example: select postid from post where threadid = ###; Then use the list of postid's in the following queries: delete from post where postid in (post#1, post#2, post#3, ...); delete from searchindex where postid in (post#1, post#2, post#3, ...); Now you can finally delete the thread: delete from thread where threadid = ###; |
#3
|
||||
|
||||
Besides you should do it via the admincp
- miSt |
#4
|
||||
|
||||
Quote:
I recently pruned 100,000 posts from my forums and it took less than 30 minutes. It would have taken much much longer through the Admin CP. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|