Unable to get proper result when i use ‘compare’ => ‘BETWEEN’ in meta_query
-
In my wordpress post_meta i have a meta_key named price in which i have stored prices such as(100, 300, 400) etc
But when i use'meta_query' => array( array( 'key' => 'price', 'value' => array(200,3000), 'compare' => 'BETWEEN', ) )
I get wrong results ? +
I also checked in phpmyadmin
SELECT * FROMxyz_postmeta
WHEREmeta_key
= ‘price’ ANDmeta_value
BETWEEN ‘200’ AND ‘3000’Still i get no proper results . may be this is because values are not stored as int ? How to solve this issue to get proper results back using meta_query .
- The topic ‘Unable to get proper result when i use ‘compare’ => ‘BETWEEN’ in meta_query’ is closed to new replies.