View Single Post
  #1  
Old 12-23-2013, 11:13 PM
webmaster74 webmaster74 is offline
 
Join Date: Mar 2007
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Batch delete spammer directly in phpmyadmin

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?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01451 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete