1

The title on the tin says it all: I need to delete 140,000 spam comments in an ExpressionEngine 1.6.4 site and need to do that via an MySQL query in phpmyadmin. These are the closed comments that appear in the CP main page under the link "Comments Awaiting Validation."

Looking at the database tables in phpmyadmin, comments are in the exp_comments table. The column called "status" has either a o or a c, meaning open - and a comment that I want to keep, while the c means a close and spam comment.

I inherited this site and have installed Akismet, but that of course won't delete the comments already there. There's no help in the EE forums with this.

4

1 回答 1

1

I would suggest a good way would be to delete the comments where there is a tag in the comment, as most comment spam contains links.

Something like:

DELETE FROM exp_comments WHERE status = 'c' AND text like '%<a%';
于 2012-05-23T02:53:45.610 回答