Hi, I've been hit with hundreds of thousands of spam comments and need to delete them from my database. Doing this manually is way too time consuming. However, I want to keep the first 30 records as they are legitimate comments. Could anyone explain what I need to do in phpmyadmin when deleting from the 'field_revision_comment_body' table? Thanks for any help, it's appreciated.
There should be a unique ID field, I will call it id. Look at the first 30 entries and find the highest id number, let's say it is 47. Your SQL statement would be: delete from field_revision_comment_body where id > 47
Thanks for your reply. I've tried doing as you suggest but get this... "#1054 - Unknown column 'id' in 'where clause'" Looking at the rows I have a field called entity_id so tried... delete from field_revision_comment_body where `entity_id` > 33 But nothing is getting deleted. Is there something I'm missing? Thanks again for any help.
Can you post a screenshot with the table? What CMS you are using? isn't there any plugin for spam comments?
Better way would be first backup those 30 records and after that delete the whole table or if you can delete all records would be good tonce Records/Table deleted create a new table with the same name and import those 30 records again.That's All! You're Done.
Hmm. Sorry, I think that is drupal? https://drupal.org/project/antispam You should be able to run this against pre-existing comments. I had to do this with wp a few weeks ago. same stuff different platform Hope that helps, Nigel