I am having trouble figuring out how to pull the meta key values for just one category. I can pull all the meta key values (for meta_key "city") in all categories no problem like this:
$querystr = "SELECT $wpdb->posts.*,$wpdb->postmeta.*
FROM $wpdb->posts, $wpdb->postmeta
WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND meta_key = 'city'";
but cannot figure out a way to limit it to a single category. Every time I try to modify the query above with various left and inner and right joins, I get back nothing useful.
Any ideas? Ideally it would filter by the category page we are on, but If I need to create individual category pages, I can deal with that...