-
-
Save spencerfinnell/03b30c698960331884f05a666141b4f6 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 SQL_CALC_FOUND_ROWS wp_4_posts.ID | |
FROM wp_4_posts | |
INNER JOIN wp_4_postmeta | |
ON ( wp_4_posts.ID = wp_4_postmeta.post_id ) | |
WHERE 1=1 | |
AND ( wp_4_posts.ID NOT IN ( | |
SELECT object_id | |
FROM wp_4_term_relationships | |
WHERE term_taxonomy_id IN (7) ) ) | |
AND ( ( wp_4_postmeta.meta_key = '_price' | |
AND CAST(wp_4_postmeta.meta_value AS DECIMAL(10,2)) BETWEEN '1' | |
AND '82' ) ) | |
AND wp_4_posts.post_type = 'product' | |
AND (wp_4_posts.post_status = 'publish' | |
OR wp_4_posts.post_status = 'private') | |
GROUP BY wp_4_posts.ID | |
ORDER BY wp_4_posts.post_date DESC, wp_4_posts.ID DESC | |
LIMIT 0, 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment