Christian Party

 

Forum

Donate

Search

Subscribe

jews/911

Feedback

dna

RCC

AIDS

Home

Surveys

Holocaust

IQ

14th Amdt

19th Amdt

Israelites

NWO

Homicide

Blacks

Whites

Signatory

Talmud

Watchman

Gaelic

TRAITORS

Medicine?

 

voip-dude
Newbie
Newbie


Joined: 02 Aug 2004
Location: United States
Online Status: Offline
Posts: 30
Quote voip-dude Replybullet Topic: Mass Delete posts by username
    Posted: 17 Apr 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?

IP IP Logged Report Post
dj air
Moderator Group
Moderator Group
Avatar

Joined: 05 Apr 2002
Online Status: Offline
Posts: 3487
Quote dj air Replybullet Posted: 17 Apr 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

E:magineHosts
WebWiz Access Database upsizing to MSSQL from �40. PM me for info

IP IP Logged Report Post
wistex
Mod Builder Group
Mod Builder Group
Avatar

Joined: 30 Aug 2003
Online Status: Offline
Posts: 750
Quote wistex Replybullet Posted: 20 Apr 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.

Modified Monday, July 13, 2009

Copyright @ 2007 by Fathers' Manifesto & Christian Party