Data stored in the database as below where category is column name and comma separated strings are values.
category = 'cat,cat1,cat2,cat3,cat33,cat4';
I'm trying to search with a category from the list:
$query= mysqli_query($mysqli, "SELECT * FROM table where
INSTR(category,'cat3') > 1 ");
But this doesn't work because the result includes cat3 and cat33.
Any thoughts on how I can do this search, please?
Thanks!