I am looking to delete all comments from my wordpress install that contain "HTTP://" within the comment content. I am using this syntax but it keeps on receiving syntax error Any help on this? Thanks in advance
If you're deleting, you'll want to use DELETE instead of SELECT Something like this should do it DELETE FROM `wp_comments` WHERE ((`wp_comments`.`comment_approved` = "0") AND (`wp_comments`.`comment_content` LIKE "%http://%")) Code (markup):
It's a wildcard. It means it should begin with http, but can end with whatever. It's not regex, though.
Yes, it should be %http://%. You're looking for posts that contain that text and don't just start with it.