I have a column that has comma separated data:
1,2,3
3,2,1
4,5,6
5,5,5
I\'m trying to run a search that would query each value of the CSV s
Use
substring_index(`column`,',',1) ==> first value
substring_index(substring_index(`column`,',',-2),',',1)=> second value
substring_index(substring_index(`column`,',',-1),',',1)=> third value
in your where clause.
SELECT * FROM `table`
WHERE
substring_index(`column`,',',1)<0
AND
substring_index(`column`,',',1)>5