I have this kind of setup.
TABLE images;
id url name
1 http://imgur.com/image1.png image1.png
2 http://imgur.com/image2.png image2.png
3 http://imgur.com/image3.png image3.png
4 http://imgur.com/image4.png image4.png
TABLE colors;
image_id hex
1 9a8166
1 9a8130
1 000000
1 cdd69a
1 9a5430
1 662730
1 000030
1 665466
2 665430
2 9aac66
2 002700
2 cdac66
2 cd819a
2 302730
2 300030
2 002730
How would I go about getting all images that contain a list of hex codes?
If I do hex in ([list of hex codes])
I'll get pretty much all images since there's a high chance they have at least one color on the list.
I'd like to get images that have all colors, then I can deal with getting images that have at least n-1 colors from the list or whatever.
Edit:
So in this case.
If I searched [blue] I'd get the images 1 and 2.
If I searched [blue, red] I'd get the images 1 and 2.
If I searched [blue, red, pink] I'd get the image 2.