Print Page | Close Window

Mass Delete posts by username

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=19363
Printed Date: 30 March 2026 at 11:30am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Mass Delete posts by username
Posted By: voip-dude
Subject: Mass Delete posts by username
Date Posted: 17 April 2006 at 3:27pm
I have spammers posting junk on my forum in multiple forum rooms and sometimes it takes me awhile before I notice. How do I mass-delete all their posts?

I've been manually searching by the spammer's username in my browser and then deleting the posts one at a time. Very tedious.

I'm on SQL Server, so I could write an SQL query to delete the user's posts from the main entry table (tblThread), but I'm not sure if there are any dependencies with other tables.
 i.e. here's an SQL query that just deletes from tblThread:
delete * from tblThread where Author_ID=<spammer's userID #>

I'm surprised this mass delete ability by username isn't part of the forum administation. I'm running 7.9

Any recommendations? Is there a plugin to do this? Or does anyone know the exact SQL query to delete from the multiple tables by username?

-------------
Tom
http://blog.tmcnet.com/blog/tom-keating - VoIP & Gadget Blog
http://voip-forum.tmcnet.com/voip-forum/forum - VoIP Forum
VoI



Replies:
Posted By: dj air
Date Posted: 17 April 2006 at 3:50pm
try the below SQL

intUserID = x

strSQL = "delete * from tblThread where Author_ID= " & intUserID &";"
strSQL = strSQL & "delete * from tblTopics where Author_ID= " & intUserID &";"

adoCon.execute(strSQL)

that will delete records but remeber you would have to re calculate the latest posters etc.. im not to sure though on this.. i cant remeber what is stored in other tables


Posted By: wistex
Date Posted: 20 April 2006 at 4:13am
Be very very very careful with this!  Just imagine if you you are user 42 and the spammer is user 52,  and you accidentally deleted user 42!  Opps!
 
What might be better is this, especially if this is the first time doing it:
 
Instead of deleting them, perform an update SQL query that makes all of his posts hidden.  That way if you screw up, they are still there.  Also, its good the save the evidence in case of a dispute or you have multiple moderators / admins who need to know about the abuse.


-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net