针对分类术语和后期元数据的Wordpress自定义查询

I have this custom query I need to do that will check against both post_metadata values and taxonomy terms. I'm using code that I modified from Wordpress's codex, but it is returning zero results consistently. Is there a mistake I've made? (UPDATED: shows where it is being loaded into a variable first)

global $wpdb;

$querystr = "
    SELECT * FROM $wpdb->posts
    LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
    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->terms.name = '" . $service . "'
    AND $wpdb->term_taxonomy.taxonomy = 'Services'
    AND $wpdb->postmeta.meta_value = '" . $county . "'
    AND $wpdb->posts.post_status = 'publish'
    AND $wpdb->posts.post_type = 'post'
    AND $wpdb->postmeta.meta_key = 'order'
    ORDER BY $wpdb->postmeta.meta_value ASC";

$pageposts = $wpdb->get_results($querystr, OBJECT);

I would suggest logging the actual string that is executed (save this select to a variable and log the variable, then pass the variable to the wpdb query). Once you have the sql, you can more easily troubleshoot it (or post it here for further assistance).