This question already has an answer here:
How can I get the ID of those books which belong to country 79 AND author 80 AND publisher 91
SELECT id FROM books WHERE (
(filter = 'country' AND cat = 79)
AND
(filter = 'author' AND cat = 80)
AND
(filter = 'publisher' AND cat = 91)
)
Here is my table structure
+----+----------+-----+
| ID | FITER | CAT |
+----+----------+-----+
| 1 | country | 79 |
| 1 | author | 80 |
| 1 | publisher| 91 |
| 2 | country | 476 |
| 2 | author | 85 |
| 2 | publisher| 121 |
+----+----------+-----+
Thank you
</div>