Created
July 23, 2019 11:34
-
-
Save sowich/3a76dabf0ea837669e7deee2a51ca71e 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 | |
wp_posts.ID | |
FROM | |
wp_posts | |
LEFT JOIN | |
wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) | |
WHERE | |
1 = 1 AND wp_posts.ID NOT IN (93110) | |
AND (wp_term_relationships.term_taxonomy_id IN (8)) | |
AND wp_posts.post_type = 'post' | |
AND ((wp_posts.post_status = 'publish')) | |
GROUP BY wp_posts.ID | |
ORDER BY RAND() | |
LIMIT 0 , 8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment