News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Delete ALL private messages

Started by spaceman, January 29, 2006, 06:09:08 AM

Previous topic - Next topic

spaceman

Is there any mod that allows admin to delete ALL private messages (including members)?

Thank you. :D

Aaron

There's no mod available to do that, however, you can easily delete all private messages via PHPMyAdmin. Run the following SQL queries:

TRUNCATE `smf_personal_messages`
TRUNCATE `smf_pm_recipients`
UPDATE `smf_members` SET `instantMessages`= '0', `unreadMessages`='0'

Please note that smf_ is the prefix of your forum's tables. If you've chosen a different one at the installation you'll need to change that in the queries. :)

That'll do! :)
Aaron.

margarett

I am sorry to be "digging the grave" and get such terribly old topic. But, that's what search is for! :)

SMF 1.1(.1), how can I use this command to delete ALL PMs, except unread ones? (if possible, of course...)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

perplexed

Quote from: Aäron on January 29, 2006, 06:38:32 AM
There's no mod available to do that, however, you can easily delete all private messages via PHPMyAdmin. Run the following SQL queries:

TRUNCATE `smf_personal_messages`
TRUNCATE `smf_pm_recipients`
UPDATE `smf_members` SET `instantMessages`= '0', `unreadMessages`='0'

Please note that smf_ is the prefix of your forum's tables. If you've chosen a different one at the installation you'll need to change that in the queries. :)

That'll do! :)
Aaron.

Hello

I want to check that this only deletes the PMs and not the members also?

~thanks



margarett

Yes you can see in the code that it does not harm your users. It deletes PMs and then set the "pm count" to "0"
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

perplexed

thanks margarett but I have not done this before, is there more instructions on what to do?

Do I enter each line as a separate query?
What else do I have to select?

Sorry but I'm new at this side of things

margarett

You open "phpmyadmin" and select your SMF DB

Then you select a tab "SQL". There you can enter those commands. Use one at a time...

Remember to backup ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair


margarett

You can do alot, indeed. But you can also mess up pretty much, if you don't know what you are doing... :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair


redone

Indeed be careful when using phpmyadmin as you could potentially cause some serious damage to your database. As ever, always make sure you have a good and up to date backup.


margarett

Well, and delete only read ones, is it possible?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

usrfsledge

Quote from: Aaron on January 29, 2006, 06:38:32 AM
TRUNCATE `smf_personal_messages`
TRUNCATE `smf_pm_recipients`
UPDATE `smf_members` SET `instant_messages`= '0', `unread_messages`='0'

Little fix in last line of code for current version. Job done, thanks!

Irisado

Thanks for the information, however, please do not revive topics which are so old in future.  Topic locked.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Advertisement: