How to using PHP to delete wordpress coments?

Sometimes there are thousands wordpresss comments there, it is too difficult to delete them. Any method to delete them one time without login phpmyadmin?

The answer is yes, the follow code can help you.

include(‘wp-config.php’);
mysql_query(“truncate table wp_comments;”);

Copy the code to file delete_wp_comment.php, and put the file under your blog. Run it, all comments will be deleted!

If you only want to delete spam or trash comments, please visit http://kingphp.com/160.html , and just change some code. Very simple!

King Php Science Welcome, you are from: 54.162.50.232