Greetings,
Problem:
I need to be able to select an image based on desired key words. The more key words that a user enters, the more narrowed down the search results will be. So, if someone were to enter the word 'beach', they would all images that have the key word 'beach'. If they were to enter 'beach, Hawaii', they would get just images that have both 'beach' AND 'Hawaii' assigned to them.
I have two tables
keywords_table (one word per row, with the image id that it is assigned to)
key_image_id
key_word
images_table
image_id
image_name
If it's important, the request will be submitted as a comma delimited list. I will be looping over the keywords and dynamically building a sql query as needed. The problem is... I can't for the life of me figure out the base query.
I am running 4.0 and can't do sub-queries.
Any ideas?
Thanks in advance