Hello
:C
This is, I'm certain, a really simple question. I can do it with several pointlessly long queries and PHP inbetween, but I know there's a way to do it in one query. I just can't remember.
I have one table, called 'images'. This goes like this :-
code:
ImageID Image
1 cat.jpg
2 mouse.jpg
3 hamster.jpg
4 dog.jpg
And then I have one called 'tags' which is like this :-
code:
Tag ImageID
"nice" 1
"nice" 4
"bitey" 2
"bitey" 3
"fuzzy" 1
"fuzzy" 2
"fuzzy" 3
"fuzzy" 4
I want a query that says :-
"SELECT * from IMAGES where....
there is a 'tag' for both fuzzy AND bitey.
And it will return me the mouse and the hamster.
Is this possible? Have I gone mad? Help
:(