• I’m using a query to check if the price of a product falls within a certain range. This works with the code below, until I use a zero value to compare from.

    array(
    	'relation' => 'OR',
    	   array('key' => 'buyprice'),
    	   array('key' => 'rentalprice'),
    	'value' => array( $_GET['price_start'], $_GET['price_end'] ),
    	'compare' => 'BETWEEN',
    	'type' => 'UNSIGNED'
    )

    How can I get this to work when the ‘price_start’ value is 0? Hoping for help.

  • The topic ‘Meta_query compare between two values’ is closed to new replies.