NotGoddess,
I haven't studied your code or docs which likely explain the purpose of this query:
Code:
SELECT c.customers_email_address as customers_email_address FROM zen_customers as c LEFT JOIN zen_configuration as q on LOCATE( c.customers_email_address, q.configuration_value) >= 1 WHERE configuration_key = 'NEWSONLY_SUBSCRIPTION_TEST_GROUP'
Am I correct that you are attempting to find email addresses from the customers table which are listed in the NEWSONLY_SUBSCRIPTION_TEST_GROUP constant?
If so, then there may be a couple workarounds:
Option A: ensure that the group entries are delimited using % and , and ' -- like this: '%[email protected]%', '%[email protected]%', '%etc%', '%etc%'
Then change your query to:
Code:
SELECT c.customers_email_address as customers_email_address
FROM customers as c
LEFT JOIN configuration as q
on c.customers_email_address
LIKE q.configuration_value
WHERE configuration_key = 'EMAIL_FROM' ;
Option B: ensure that the entries are delimited with ' and , --- like this: '[email protected]', '[email protected]', 'etc', 'etc', 'etc'
Then use a query like this:
Code:
SELECT c.customers_email_address as customers_email_address
FROM customers as c
LEFT JOIN configuration as q
on c.customers_email_address
IN (q.configuration_value)
WHERE configuration_key = 'EMAIL_FROM' ;
I haven't tested exhaustively, but this may provide a workaround or perhaps help steer you in another direction.
Bookmarks