MySQL Forums
Forum List  »  Newbie

reading database
Posted by: Steve Wilson
Date: May 18, 2024 12:39PM

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.

Options: ReplyQuote


Subject
Written By
Posted
reading database
May 18, 2024 12:39PM
May 18, 2024 05:15PM
June 10, 2024 01:41PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.