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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -