The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Delete Orphan Attachments Query
I was wondering if anyone had any suggestions of a script or a query that I could use that would allow me to delete orphan attachments from my database. I can usually whip up a query that will do what I want it to do except in this case I am not having much luck mainly because with this query I am assuming I am gonna have to use the thread/post table as some sorta reference for deleting orphan attachments from the attachment table.
I found this query when I searched the forums but it's for deleting all attachments in a specific forum. From looking at the query though it looks like it might be almost what I am looking for. [SQL]DELETE FROM attachment USING attachment, post, thread WHERE attachment.postid = post.postid AND thread.threadid = post.threadid AND thread.forumid = X[/SQL] Anyone have any ideas? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|