Bounty Cap

choose product included a couple of class by SQL question in WordPress


Sharing is caring!

i used beneath code to pick out product from particular class and work fin however i wish to choose product if embody a couple of class

SELECT put up.ID, put up.post_title FROM  `wp_posts` as put up

INNER JOIN wp_term_relationships AS tr ON tr.object_id = put up.ID 
WHERE
put up.`post_type` IN ('product','product_variation') 
AND tr.term_taxonomy_id  IN(32,25)

I take advantage of IN(32,25) and return all product embody in two class , how can I filter merchandise simply included in two class?

Sharing is caring!

Exit mobile version