Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Mass Delete posts by username
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Mass Delete posts by username

 Post Reply Post Reply
Author
voip-dude View Drop Down
Newbie
Newbie


Joined: 02 August 2004
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote voip-dude Quote  Post ReplyReply Direct Link To This Post Topic: Mass Delete posts by username
    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?
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.