Skip links

How to delete multiple rows of Spam from your database based on ID

September 16, 2010

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’

chris-parker
This website uses cookies to improve your web experience.
chris-parker

Send me a message.

Happy to answer any question you may have.

chris@chrisparkerdesign.co.uk

07813 311253

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

    CHRIS PARKER DESIGN

    chris@chrisparkerdesign.co.uk

    07813 311253