How to delete multiple rows of Spam from your database based on ID
By Chris on September 16, 2010 in php
0
0
The answer is a simple line of SQL. Simply run this SQL query on the offending table (in this case ‘warranty_customers’ is the table and the bad entries range from id 279 to 1400). Simples!
DELETE FROM `warranty_customers` WHERE `warranty_customers`.`id` >279 LIMIT 1400 ;
If you are using WordPress you can use the line in PhpMyAdmin:
DELETE FROM wp_comments WHERE comment_approved = 0
or if you are using Askimet (where the value of approved may be set to ‘spam’) use this line in phpMyAdmin:
DELETE FROM wp_comments WHERE comment_approved = ‘spam’
0 Comments
Leave a reply
Leave a Reply
You must be logged in to post a comment.