Announcement

Collapse
No announcement yet.

Remove all attachments?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove all attachments?

    I have an interesting situation.

    I shut my board down in 2005 and just re-opened it. My board had tens of thousands of attachments - stored in the file system. When we shut down, we kept everything, but deleted the attachments folder. I just restored my database and now, of course, all the threads that have attachments are showing errors because they can't find the non existing attachments.

    I don't want to lose the threads and posts. Does anyone have a recommendation on how to go about writing a query to remove attachment links from each post? Thank you in advance.

  • #2
    Try running this query:

    UPDATE post SET attach = 0;

    You should then also be able to truncate the attachment table.
    As always, make sure to back up your database before running queries!
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      Thanks, that did the job

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X