• Trying to select from database based on meta_keys and meta_values. Tried this code below but I need it to only show the data from “08/04/2024” & “Morning 08:00 – 12:00”

    SELECT DISTINCT
    t1.id,
    t1.meta_value AS DatePicked,
    t2.meta_value AS TimePicked
    FROM
    pxyv_wc_orders_meta t1
    JOIN pxyv_wc_orders_meta t2 ON t1.order_id = t2.order_id
    WHERE
    t1.meta_key = ‘_billing_collection_date’
    AND t2.meta_key = ‘_billing_collection_time’

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘getting data from database’ is closed to new replies.