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:

image

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

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -