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?
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?