I am confused about how to go about doing the following task using PHP and SQL:
I have an image database with the following columns: title, keywords, desc, date_entered, image_link.
The keywords column has values stored like this: value1;value2;value; ...
Now I have to provide a form to users in which they can enter one or more keywords and they will get all the images in the result that have these keywords attached to them in the database.
Users are also required to enter the keywords in this formate: value1;value2; ... but they are not required to enter all the related keywords to get any specific image in the result, even a single keyword should return some images in the result if the keyword matches any images.
I can not just do " ... where $enteredKeywords
like keywords
"; because the user may have not entered all the keywords for an image and it may never exactly match to an image record in the database. I am not sure how can I accomplish this task.