SELECT wposts.*, wpostmeta.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta, $wpdb->postmeta wpostmeta2, $wpdb->postmeta wpostmeta3
WHERE wposts.ID = wpostmeta.post_id
AND wposts.ID = wpostmeta2.post_id
AND wposts.ID = wpostmeta3.post_id
AND wpostmeta.meta_key = 'listing_subtype'
AND wpostmeta.meta_value = '$search_home_type'
AND wpostmeta2.meta_key = 'district'
AND wpostmeta2.meta_value = '$search_district'
AND wpostmeta3.meta_key = 'price_current'
AND wpostmeta3.meta_value IS >= '$search_price_min' AND <= '$search_price_max'
AND wposts.post_status = 'publish'
AND wposts.post_type = 'vreb_property'
ORDER BY wposts.post_date DESC
この行は、 meta_keyのmeta_valueがGREATERTHANおよびLESSTHANでAND wpostmeta3.meta_value IS >= '$search_price_min' AND <= '$search_price_max'
あることを確認しようとしています。 price_current
$search_price_min
$search_price_max
これは機能していません...
[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<= '100000' AND wposts.post_status = 'publish' AND wposts.post_type = 'vreb_' at line 11]