4
Birden fazla meta anahtar değeri sorgula?
Mutiple meta anahtar değerleri aynı anahtarla nasıl sorgulanır $querystr = " SELECT $wpdb->posts.* FROM $wpdb->posts, $wpdb->postmeta WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->postmeta.meta_key = 'key1' AND $wpdb->postmeta.meta_value = 'value1' // why doesn't this work? AND $wpdb->postmeta.meta_value = 'value2' AND $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'post' ORDER BY $wpdb->posts.post_date DESC "; …
22
query