Support » How-To and Troubleshooting » Meta_query compare between two values
2 years, 10 months ago
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.
'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.