I have a MySQL query that looks something like this:
SELECT column1_value, column2_value
FROM some_table
WHERE column2_value IN (a,lot,of,comma,separated,values)
AND column1_value NOT IN (SELECT column1_value,
column3_value
FROM some_table
WHERE column3_value = some_number)
ORDER BY something DESC
LIMIT 4
But i keep getting an error, what is wrong?
Can’t i do IN and then NOT IN?
Thanks in advance
The problem is this line
Notice the inner subquery?
You are returning two columns in the data-set! It should just be
Or whatever (single!) column you want to test against.