MyBB Community Forums

Full Version: Delete spam post from sql db
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
May i know how to delete spam post from sql db if i have the username of the spammer?
DELETE FROM `mybb_posts` WHERE `username` = 'X'

DELETE FROM `mybb_threads` WHERE `username` = 'X'

Replace X with the spammer's username.
You may run the following query in order to delete all his posts;
DELETE FROM `mybb_posts` WHERE `uid` = 'X';
Replace X with the UserID of that spammer.

Similarly, if they have made any thread, then run this query as well;
DELETE FROM `mybb_threads` WHERE `uid` = 'X';
Replace X with the UserID of that spammer.

Its always advised to take a backup of posts table before running that query.

Then you'll just need to run the recount and rebuild tools to recount the stats.
great.it works.

thank you.
I'm inheriting a forum established years ago, and it is filled with thousands of spam registrants who have never posted (they just register with a link to a website in profile, etc.)

Ok, one solution would seem to be to delete all registered who are more than 1 year old and have never posted.

Anyway to do that?
(2011-04-27, 05:47 PM)Talon Wrote: [ -> ]I'm inheriting a forum established years ago, and it is filled with thousands of spam registrants who have never posted (they just register with a link to a website in profile, etc.)

Ok, one solution would seem to be to delete all registered who are more than 1 year old and have never posted.

Anyway to do that?

If you are using MyBB 1.6 then you can Prune those spam accounts.

Go to: ACP > Configurations > User Pruning > and edit options like shown in the image;
[attachment=22472]
(2011-04-27, 05:56 PM)Yaldaram Wrote: [ -> ]
(2011-04-27, 05:47 PM)Talon Wrote: [ -> ]I'm inheriting a forum established years ago, and it is filled with thousands of spam registrants who have never posted (they just register with a link to a website in profile, etc.)

Ok, one solution would seem to be to delete all registered who are more than 1 year old and have never posted.

Anyway to do that?

If you are using MyBB 1.6 then you can Prune those spam accounts.

Go to: ACP > Configurations > User Pruning > and edit options like shown in the image;

Thanks very much!
Thanks.
New 1.6x admincp feature when browsing the user list.

Scroll to the bottom of the list and you'll see: "Inline User Moderation"

You can search for your user. The scroll down and select "Prune/Delete Users Posts". You can even do this for multiple users at the same time. Smile

Handy.
(2011-04-28, 06:31 AM)Yaldaram Wrote: [ -> ]Thanks.

thanks a lot dear ..you are the best ..
Pages: 1 2