I am using a SQL query which is apparently invalid, but I cannot see why. Here is the query:
SELECT email
FROM mls_member
WHERE active = 'true' AND id IN (
SELECT DISTINCT member_id
FROM mls_listlink
WHERE list_id = '1' OR list_id = '3' )
I have tried it using the new MySQL 4.0 subquery (I have v. 4.0 installed) syntax also, but it returns the exact same error:
SELECT email
FROM mls_member
WHERE active = 'true' AND id = (
SELECT DISTINCT member_id
FROM mls_listlink
WHERE list_id = '1' OR list_id = '3' )
And here is the error that phpMyAdmin returns:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the
right syntax to use near 'SELECT DISTINCT member_id