I'm querying my MySQL db to match something like this "A and B and C"
TABLES: mcl_media
Table Structure:
mcl_media
person_id | mtype_id
1 | 1
1 | 3
3 | 2
My Query Syntax:
SELECT person_id
FROM mcl_media
WHERE mtype_id in (1,3,2)
GROUP BY person_id
In this query using the sample records above I should/want to get the result to be nothing, Because person 1 only has 2 of the required mtype_id's but I wind up getting person_id = 1
Just like it was an OR statement.
Any query help greatly appreciated!!!