MySQL Forums
Forum List  »  Newbie

Re: reading database
Posted by: Alison Iddings
Date: June 10, 2024 01:41PM

Try this...
SELECT order_id
FROM pxyv_wc_orders_meta AS meta1
WHERE meta1.meta_key = "_billing_collection_date"
AND meta1.meta_value = "08/04/2024"
AND EXISTS (
SELECT 1
FROM pxyv_wc_orders_meta AS meta2
WHERE meta2.order_id = meta1.order_id
AND meta2.meta_key = "_billing_collection_time"
AND meta2.meta_value = "Afternoon 13:00 - 17:00"
)

- Alison Iddings
https://cityofoaksmarketing.com/

Options: ReplyQuote


Subject
Written By
Posted
May 18, 2024 12:39PM
May 18, 2024 05:15PM
Re: reading database
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.