Does anyone know an SQL Query I can use to delete all PM's of a certain subject. For example, all PM's that say "Quote Notification" in the subject.
Query to erase PM's of specific subject
Collapse
X
-
-
In the Admin CP go to Users -> Search for Users. Enter in the User's name and submit the form. On the resulting user profile page use the Quick Links Dropdown in the upper left corner and select "Delete All User's Private Message". You can also delete all Private Messages sent by the user.
Running a direct query on this is difficult because the message is assigned to multiple users.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API -
In the Admin CP go to Users -> Search for Users. Enter in the User's name and submit the form. On the resulting user profile page use the Quick Links Dropdown in the upper left corner and select "Delete All User's Private Message". You can also delete all Private Messages sent by the user.
Running a direct query on this is difficult because the message is assigned to multiple users.Comment
-
That would have the least potential to cause damage to your system.Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Comment
-
It's more complicated than you think, since the title of the PM is stored in the pmtext table. If you just delete those entries, you are then potentially left with "ghost" PMs that don't have any data. So you'd need to look up the pmtextid, and then find any pmid's that reference that pmtextid, and delete those. Then you have new PM notifications and PM read notifications to worry about as well. Because of the potential to mess up your forum, this isn't something we can provide official support for.MARK.B
vBulletin Support
------------
My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
My Unofficial vBulletin Cloud Demo: https://www.adminammo.comComment
Related Topics
Collapse
-
by PiotrGT1Is it possible to mass delete all private messages for all users via vbulletin or can someone come up with SQL script that does that?
-
Channel: Support Issues & Questions
-
Comment