Home › Forums › ACF PRO › Empty Field Check in SQL › Reply To: Empty Field Check in SQL
I’m not exactly sure what it is you’re trying to do really.
You’re looking for posts that do not have any value set for “status” and a value in “sale_price” that is < 300000?
If this is correct then:
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'sale_price',
'value' => 300000,
'type' => 'NUMERIC',
'compare' => '<'
),
array(
'relation' => 'OR',
array(
'key' => 'status',
'compare' => 'NOT EXISTS'
),
array(
'key' => 'status',
'value' => '',
'compare' => '='
)
)
)
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.