PDA

View Full Version : Batch delete spammer directly in phpmyadmin


webmaster74
12-23-2013, 11:13 PM
Hi. I know manipulating the database directly is counter-recommended, but when I have hundreds of spammers that managed to register on my forums, it is very hard to see them pollute my forums and not go to extreme solutions.

How would you fix the below code ?

set $='36002', '36003', '36004', '36006', '36008', '36009', '36012', '36013', '36015', '36018', '36020', '36023', '36024', '36029', '36030', '36031', '36034', '36035', '36038', '36039', '36041', '36042', '36044', '36045', '36048', '36051', '36052', '36056', '36058', '36060', '36061', '36065', '36066', '36069', '36070', '36071', '36072', '36073', '36075', '36076', '36077', '36078', '36079', '36080', '36082', '36086', '36088', '36089', '36090', '36092', '36094', '36096', '36097', '36099', '36100', '36101', '36103', '36104', '36106', '36108', '36109', '36110', '36112', '36113', '36114', '36116', '36117', '36118', '36120', '36121', '36122', '36123', '36124', '36125', '36126', '36127', '36128', '36129', '36130', '36131', '36132', '36133', '36134', '36135', '36136', '36137', '36138', '36139', '36140', '36141', '36142', '36143', '36144', '36145', '36146', '36147', '36148', '36149', '36150', '36151', '36152', '36153', '36154', '36156', '36157', '36158', '36159', '36160', '36161', '36162', '36163', '36165', '36168', '36170', '36171', '36172', '36173', '36175', '36177', '36178', '36179', '36180', '36181', '36182', '36183', '36184', '36185', '36186', '36187', '36188', '36189', '36190', '36191', '36192', '36193', '36194', '36195', '36196', '36197', '36199', '36200', '36201', '36202', '36203', '36204', '36205', '36206', '36207', '36208', '36209', '36210', '36211', '36212', '36213', '36214', '36216', '36217', '36218', '36219', '36220', '36221', '36222', '36223', '36224', '36225', '36226', '36227', '36228', '36229', '36230', '36231', '36232', '36233', '36234', '36235', '36236', '36237', '36238', '36239', '36241', '36242', '36243', '36244', '36246', '36248', '36249', '36250', '36251', '36252', '36253', '36254', '36257';
delete from user where userid=$;
delete from blog where userid=$;
delete from blog_text where userid=$;
delete from blog_subscribeentry where userid=$;
delete from thread where postuserid=$;
delete from post where userid=$;
delete from album where userid=$;
delete from attachment where userid=$;
delete from picturecomment where postuserid=$;
delete from pmtext where forumuserid=$;
delete from socialgroup where creatoruserid=$;
delete from usertextfield where userid=$;
delete from visitormessage where postuserid=$;

Did I forget some important deletes from other tables?

ozzy47
12-23-2013, 11:17 PM
I would not do that, I would move them into another group, that has no other users, and then use the Prune / Move Users in the ACP

webmaster74
12-23-2013, 11:35 PM
I would not do that, I would move them into another group, that has no other users, and then use the Prune / Move Users in the ACP


Good idea indeed......... but would pruning them delete all their spam such as blogs and blog comments?

ozzy47
12-23-2013, 11:37 PM
IIRC, there was options to delete everything, been awhile since I had to do that, spam is not a issue anymore on my sites.

webmaster74
12-23-2013, 11:46 PM
IIRC, there was options to delete everything, been awhile since I had to do that, spam is not a issue anymore on my sites.


are you using GlowHost on your sites to fight spam?

Alone or with BadBehavior?

ozzy47
12-24-2013, 01:03 AM
You can read all about it on my site here, http://ozzmodz.com/showthread.php?506-The-Era-Of-Big-Spam-Is-Over

webmaster74
12-24-2013, 12:36 PM
great reading indeed. Thank you ozzy47. I have even installed two of the mods recommended there.

ozzy47
12-24-2013, 12:43 PM
It should help with the fight against spam.

webmaster74
12-24-2013, 12:59 PM
It should help with the fight against spam.


Thank you very much for all the great help you have provided in this.