• Resolved shrimp2t

    (@shrimp2t)


    I’ve try to get customer by email:

    $customer = new EDD_Customer( $email );

    And i got the error: Syntax error near ‘AS email_mt ON wp_edd_customers.id = email_mt.customer_id WHERE ( ( emai’ at line…

    Here are your query code:
    `
    SELECT wp_edd_customers.*
    FROM wp_edd_customers LEFT JOIN AS email_mt ON wp_edd_customers.id = email_mt.customer_id
    WHERE
    (

    ( email_mt.meta_key = ‘additional_email’ AND email_mt.meta_value = ‘[email protected]’ )

    OR email = ‘[email protected]

    )

    GROUP BY wp_edd_customers.id ORDER BY wp_edd_customers.id DESC LIMIT 1
    `

    The query should be:
    `
    SELECT wp_edd_customers.*
    FROM wp_edd_customers LEFT JOIN wp_edd_customermeta AS email_mt ON wp_edd_customers.id = email_mt.customer_id
    WHERE
    (

    ( email_mt.meta_key = ‘additional_email’ AND email_mt.meta_value = ‘[email protected]’ )

    OR email = ‘[email protected]

    )

    GROUP BY wp_edd_customers.id ORDER BY wp_edd_customers.id DESC LIMIT 1
    `

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘BUG: MySQL Syntax error ver 5.5.55’ is closed to new replies.