Find Rows in Vertical Line-separated values in MySQl?
- by Trez
Let say i have a field 'category' with the value '1|2|3'. I want to search in mysql such that it will return all rows matching my search parameter into the values of the category.
for example:
$cat_id = 1;
SELECT * FROM `myTable` WHERE cat_id is equal or found in category with values '1|2|3'...
something like that..i do not know how to put it in correct sql query.
Any Ideas? thanks in advance.