Ciao guys, I am trying to get products by an $wpdb->get_col() SQL query, but I am in trouble with the SQL syntax. I need products which have an exact category and IN at least one taxonomy terms.
SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (142,77,76,84,83) AND term_taxonomy_id = 135
This SQL doesn't work, but I hope there is a solution to run such a query. Thanks,