php - SQL SELECT WHERE AND more then one -
sorry don't know how ask question. i'm trying ajax filtration in woocommerce database. @ image below:
now, want select object_id (few thousands there) term_taxonomy_id = 120 , 119 query this:
$query = "select `object_id` `wp_term_relationships` `term_taxonomy_id` = '119' , `term_taxonomy_id` = '120' "; and of course doesn't work. how can in different way? thanks.
use in operator here instead of and
select object_id wp_term_relationships term_taxonomy_id in ('119' ,'120');
Comments
Post a Comment