The server my site was stored on recently had a catestrophic RAID array failure which resulted in the loss of all data. The site has now been restored from a backup however the recently uploaded images are missing however the the SQL database still refers to them (independent server so no data lost). Is there a way to mass remove all dead links to the images that no longer exist?
If not is there a 3rd party tool to do so? (I guess I should post that on the other forum but I thought it polite to safe x-posting in the hope that there is already a facility I've overlooked).
Thanks to anyone who's able to provide any help, it's all appreciated.
Wow that sucks. I can't think of anything off hand that has been created but I think you may be able to figure something out with phpMyAdmin. If you can figure out what is the most recent photo that is still up I think you could delete all other posts after.
The pid value in the pictures database is auto_incremented so if you can find the last good picture and remove all references to the other pictures that occur there after I think it should work.
I don't have the table structure in front of me right now, but I also think you will have to make a few mods to the other tables.
Anyone else care to check my reasoning? Is there anything I am missing?
Kevin
Of course if you had a corresponding backup of the database that would work to.
What you've said makes sense to me. My knowledge of SQL is poor at best but I'm sure I can write a simple enough query to report back the appropriate records.
Thanks for your help.
Try the attached - unzip, upload to cpg dir, and run from browser.