is this possible for 2 taxonomy and 2 terms
$querystr = "
SELECT *
FROM $wpdb->posts
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
WHERE $wpdb->posts.post_type = 'shows'
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->term_taxonomy.taxonomy = 'location'
AND $wpdb->term_taxonomy.taxonomy = 'genre'
AND $wpdb->terms.slug = 'california'
AND $wpdb->terms.slug = 'comedy'
ORDER BY $wpdb->posts.post_date DESC
LIMIT 10
";
$pageposts = $wpdb->get_results($querystr, OBJECT);
if ($pposts):
foreach ($pposts as $post):
setup_postdata($post);
the_title();
echo '<br'>;
the_content();
endforeach;
endif;
i tried putting this code above but the doesnt display anything; I want to display posts that has 2 term name and 2 taxonomy
like for example: sampleposts [showlocation_tax][genre_tax]
showlocation_tax has terms
-california -LA
while genre_tax - comedy - fashion
what i want to do is i want to show all post for example:
posts from california with comedy shows something like that
i will really appreciate your help a lot