PDA

View Full Version : Remove all attachments?


Reece^B
09-07-2013, 05:22 PM
Hi

I need to reset all attachments, the DB links to a file path where nothing exists.

Is there a MySQL command?

ozzy47
09-07-2013, 06:57 PM
Do you mean remove all of them, or point them to a different path?

Reece^B
09-08-2013, 06:48 AM
Remove all known entries (avatars/profile pics/attachments) etc

snakes1100
09-08-2013, 07:13 AM
Avatars are seperate from the others, but vb has always had the remove option for attchments built into the attachment manager section.

The others would require some queries.

ozzy47
09-08-2013, 11:54 AM
As always, make sure to back up your database before running queries!

For attachments:

Try running this query:

UPDATE post SET attach = 0;You should then also be able to truncate the attachment table.

If both types of the following images are stored in the database, try these 2 queries...

For avatars:

Try running this query:

DELETE FROM customavatar USING customavatar LEFT JOIN user ON user.userid = customavatar.userid For profile pics:

Try running this query:
DELETE FROM customprofilepic USING customprofilepic LEFT JOIN user ON user.userid = customprofilepic.useridThis is untested, but it should work. Just remember, make sure to back up your database before running queries!

snakes1100
09-08-2013, 06:55 PM
As always, make sure to back up your database before running queries!

For attachments:

Try running this query:

UPDATE post SET attach = 0;You should then also be able to truncate the attachment table.



I wouldnt do that, use the built in tool provided for vb, as it will reset all the tables that hold attachment info.

Reece^B
09-10-2013, 07:40 PM
Is there a way to reset sigs?

ozzy47
09-10-2013, 11:40 PM
To what?

Reece^B
09-11-2013, 08:13 PM
blank

Reece^B
09-13-2013, 05:18 AM
anyone?

ozzy47
09-13-2013, 08:54 AM
To delete the signatures for everyone run this query.UPDATE usertextfield SET signature = '';