View Full Version : Problem with soft delete query
vbplusme
04-24-2009, 06:32 PM
Hello and Greetings,
I found a query:
DELETE FROM " . TABLE_PREFIX . "post WHERE visible = '2'
It does indeed remove a soft post from the database but it does not clear the post from the thread. What do I need to do to tell vB that the soft delete post is gone?
TIA
Lynne
04-24-2009, 06:53 PM
What do you mean "clear it from the thread"? Is it still showing up in the showthread page or do you mean it is still listed as the last post of the thread or ??
vbplusme
04-25-2009, 01:01 AM
Its a test "thread" ... I looked at this thing for hours thinking that it was a "post", oops! Just check the posts that I deleted with the query and they are indeed gone.
Edit: In case this is not clear, if you are trying to get rid of "soft deletes" via a CRON hack, you have to do two queries, one to get rid of the "posts" and another if you want to delete "threads". For example, a member creates a thread, adds a post then figures out its a mistake and deletes it. If you use the query above it only removes the "post". You have to run a second query to remove the soft delete on the thread:
DELETE FROM " . TABLE_PREFIX . "thread WHERE visible = '2'
HTH
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.