Created
July 2, 2017 21:14
-
-
Save edrdesigner/e672d865967bfd4d999d5966c6c535dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT(p.ID), p.post_title, p.post_content FROM `wp_posts` p | |
LEFT JOIN wp_posts im ON p.ID = im.post_parent AND im.post_type = "attachment" | |
WHERE p.post_status ='publish' | |
AND p.post_type = "post" | |
AND im.ID IS NULL | |
AND p.post_content NOT REGEXP 'src=".*"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment