DELETE FROM w3t_Messages WHERE M_Sent < UNIX_TIMESTAMP('2003-10-16')
(This will delete all PM:s sent before the given date, which is in the format YYYY-MM-DD.)
DELETE FROM w3t_Messages WHERE M_Sent < UNIX_TIMESTAMP( DATE_SUB(CURDATE(), INTERVAL 1 MONTH) )
(This should delete all PM:s that are older than 1 month, regardless of what date it is.)
How to delete all pm's that have a certain word in them
DELETE FROM w3t_Messages WHERE M_Message LIKE '%yourwordhere%'
(This will remove all PM:s where the word exists, regardless of if it's only part of a word.)
How to replace / change a pm a user sent to all members
UPDATE w3t_Messages SET M_Message = 'Your new message' WHERE M_Subject = 'Subject of your PM' AND M_Sender = 2
(All PM:s sent by user number 2 will have the message replaced with the new message.)
How to make all visitors make a donation or purchase a subscription :-)
UPDATE w3t_Users SET U_Donation = 'yes'
Disclaimer: Please make a backup of your database before trying of any of these queries. Also, change "w3t_" to whatever you have set as your database prefix. Some queries might not work in all versions of UBB.threads.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.