MyBB Community Forums

Full Version: private message delete from datenbank
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

How can I delete private messages in the database by several members at once .

thank you
Replace mybb_ with your table prefix. ALSO, always back up before mass-deleting database records! I have not tested this myself, so your mileage may vary.

Here's an SQL query that deletes all messages sent FROM the specified UIDs:
DELETE FROM `mybb_privatemessages` WHERE `fromid` IN ('uid1', 'uid2', 'uid3');

Here's an SQL query that deletes all messages sent TO the specified UIDs:
DELETE FROM `mybb_privatemessages` WHERE `toid` IN ('uid1', 'uid2', 'uid3');
thank you