I will illustrate my question with a fruit example:
I have an array with some values of fruit_type id's.
$match= array("1","5","8").
I have a cell (fruit_type) in the table 'fruit'. The value of this cell is like this: "1,3,9". It contains all the fruit_type id's that belong to this row.
Now I want to make my SELECT query to return all the rows that have any, a combination of all of the id's 1,5 or 8.
This query won't work, because this will only work if the cell value is '1,5,8' and not 1 or 5 or 8 (or a combination or all of them):
SELECT * FROM fruit WHERE fruit_type IN ('".implode("','",$match)."')
Any ideas?
EDIT (I think the question wasn't clear enough.. So what I would like in this example is: A query that will match ANY of the (cell) value's 1 or 3 or 9 with ANY of the value's from $match (1 or 5 or 8).