Hi There,
I'm trying to query a Wordpress database and it's meta_keys
My Code is:
SELECT order_id
FROM pxyv_wc_orders_meta
WHERE (meta_key, meta_value) = ("_billing_collection_date","08/04/2024")
AND EXISTS (SELECT 1
FROM pxyv_wc_orders_meta
WHERE (meta_key, meta_value) = ("_billing_collection_time","Afternoon 13:00 - 17:00")
)
But the "AND Exists" part does not work.
I'm trying to reference 2 Meta_Values on the same row.
Can anyone help.
Thanks.
Best Regards,
Steve.