But does it display the error message? It should, since that's why there's a comment in your code already. So someone at some point agreed with me, but I guess you're only wanting to make essential changes now. PHP: $db->query_write(" UPDATE " . TABLE_PREFIX . "filedata SET filedata = '', thumbnail = '' WHERE filedataid IN (" . implode(",", $attachmentids) . ") "); 1. If you move attachments from the database to the file system then the filedata and thumbnail columns are cleared. 2. If you move attachments from the file system to the database then the files are deleted from the file system. At no point should the filedata table have rows removed while the storage type is being changed. So the only issue here is that the message displayed doesn't reflect what's actually going on. It's not a major issue, but because it said that there's an "error" I had to check that everything did get relocated correctly.