I have two tables:
the game
`id` INT(11)
game_tags
`game` INT(11) `tag_id` INT(11)
game_tags.game = game.id
I am terrible with MySQL, so here is my question: I want to find that games has a certain amount of tag_id . Therefore, if I have four tag_id (3, 5, 7, 11), I want to find which games will have all four of these tags by looking at the game_tags table. Here is an example of what I mean:
pseudo-MySQL:
SELECT * FROM `games` WHERE (search through game_tags table and find which rows have the same `game` field and all of the tag_id that I need to search for) LIMIT 0, 15
I know that I explained this terrible (I could not say it, as in my opinion), so if you have any questions, just leave a comment.
source share