View Full Version : thread mass delete
manuelsechi
12-20-2011, 02:47 PM
hello
is there a safe way to delete a lot of threads and messages using the sql shell? using the admincp is too slow...
thank you
I think it would be complicated because there are some other things you have to do than just delete threads rows for the thead table. I think it would be a better idea to write a php script that uses the Thread datamanager to do the deleting. But in either case, how would you select the theads to be deleted?
manuelsechi
12-20-2011, 04:20 PM
I just want to delete all the thread in some forum, what about something like this?
delete from post where threadid in (select id from thread where forumid = 1)
and then
delete from thread where forumid = 1
or
I could simply delete threads and then purge orphan messages? I just want to avoid producing dirty data...
thank you
Well, I was just going by what's in vB_DataManager_Thread when a thread gets deleted, but it's true, as you pointed out, omitting some steps doesn't necessarily mean there will be problems. And I don't really know what will happen if you just delete the thread (and maybe the post) records - maybe someone else does.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.