I have the general idea of what I need to do but, no idea that I have seems to works so I don't how to do it.
I'll give an example of what I mean:
Say I'm trying to select media with tag_id's of 4,15 and 9 from the table mediaTable
I want it so I only get film1 but, if I write the statement like this:
SELECT media FROM mediaTable WHERE tag_id = 15 OR tag_id = 4 OR tag_id=9
There are several solutions, but the shortest is probably
select media from mediaTable where tag_id = 15 OR tag_id = 4 OR tag_id=9 group by media having count(distinct tag_id) = 3