Last active
January 10, 2019 10:32
-
-
Save wickywills/484391df0898d9bfaa7204b258208063 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
```sql | |
SELECT * | |
FROM db_name.wp_posts | |
WHERE db_name.wp_posts.post_type = 'product' | |
AND db_name.wp_posts.ID NOT IN | |
(SELECT db_name.wp_posts.ID | |
FROM db_name.wp_posts | |
INNER JOIN db_name.wp_term_relationships | |
ON db_name.wp_posts.ID = | |
db_name.wp_term_relationships.object_id | |
WHERE | |
post_type = 'product' | |
AND | |
term_taxonomy_id LIKE 1267); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment