All Topics
“NOT EXIST” condition with ACP\Query\Bindings
I want to create a query for searching a column (class/column/search.php) that return the posts that do not have a particular meta key. Similar SQL as follow:
SELECT …… WHERE
NOT EXISTS (
SELECT * FROM wp_postmeta AS pm WHERE pm.post_id = p.ID AND pm.meta_key=’meta_value’)
How should I program the binding? Thank you in advance for your guidance.
You must be logged in to reply to this topic.