Created
December 19, 2022 12:39
-
-
Save attilabacso/43db7e026d4af327e64f8e4b74d4a42c 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
# GET ALL WOOCOMMERCE PRODUCTS BY CATEGORY ID (124) | |
SELECT ID, post_title | |
FROM wp_posts | |
INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) | |
INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) | |
WHERE wp_term_taxonomy.term_id IN(124) | |
GROUP BY ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment