Add "Category" to Custom Query Mysql
-
Hallo forum π
I’ve this mysql query:
$querystr = " SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE post_id IN( SELECT DISTINCT wpostmeta.post_id FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'Land' AND wpostmeta.meta_value = 'Europe' AND wposts.post_type = 'post' ) AND meta_key ='city' ORDER BY $wpdb->postmeta.meta_value ASC "; $cities = $wpdb->get_results($querystr, OBJECT);
How can i add search for “category name or ID” ?
Thanks!!! π
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add "Category" to Custom Query Mysql’ is closed to new replies.