• 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 * FROM xyz_postmeta WHERE meta_key = ‘price’ AND meta_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 .

    • This topic was modified 8 years, 7 months ago by keesiemeijer.
  • The topic ‘Unable to get proper result when i use ‘compare’ => ‘BETWEEN’ in meta_query’ is closed to new replies.