I want be able to find tags of items under the a certain category. Following is example of my database design:
images
+----------+-----+-------------+-----+
| image_id | ... | category_id | ... |
+----------+-----+-------------+-----+
| 1 | ... | 11 | ... |
+----------+-----+-------------+-----+
| 2 | ... | 12 | ... |
+----------+-----+-------------+-----+
| 3 | ... | 11 | ... |
+----------+-----+-------------+-----+
| 4 | ... | 11 | ... |
+----------+-----+-------------+-----+
images_tags
+----------+--------+
| image_id | tag_id |
+----------+--------+
| 1 | 53 |
+----------+--------+
| 3 | 54 |
+----------+--------+
| 2 | 55 |
+----------+--------+
| 1 | 56 |
+----------+--------+
| 4 | 57 |
+----------+--------+
tags and categories each have their own table relating the id to an actual name(text).
So my question is how will i find out that images with category_id
=11 have have the tag_id
53 54 56 57.
In other words how to find the tags that images in certain category have?