I have a DB field called 'colors' where I store favourite colors from people. These are selected from a multi-select field and I store them all in one field. I use PHP to get all the values in one field using:
$lookfor = implode(",", $looking_for);
What's the best way to search for a string within a field that contains values in the format red,blue,yellow....
Since the users will use the same multi-select box I still need to access the values in this format. I tried using
SELECT *
FROM users
WHERE users_looking_for LIKE '%$lookfor%'
But this won't work if my values are not store in the same order as they are searched.