The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Script/SQL comman(s) for querying for orphaned images/attachments?
I just found a 2.7MB+ pdf file stired in 'filedata' table that was orphaned.... IAW had NO reference anywhere else... not in 'attachment' table, et al. As far as I can tell, unless the file is listed in 'attachment', you can't find it in CP or anywhere else except by accident using phpMyAdmin, et al. database browser.
So... if there is one orphan attachment, there is likely more... and I want to clean 'em out. I'm not a DBA or a SQL guy, so can anyone help out? Looks like to me what needs to happen is that I need to run an outside loop choosing each filedataid one at a time, and then see if there is a corresponding record in attachment with the same filedataid... and for any record in filedata that doesn't have a corresponding record in attachment, the record is added to a list of records to display as the query result. Anyone want to take a stab at helping me construct such a query/tool? Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|