Hi,
i am trying to write a query to find whether a number exists in a list of number (separated by comma) in a field.
The field can contain something like 19,20. I want to be able to see if, for example, 19 is in that field.
I tried LIKE but it doesn't seem to work. If the option passed is "1" and the field contains 19, it returns true.
$id = 1;
SELECT name FROM TABLE1 where FIELD1 LIKE '%$id%', returns true if FIELD1 contains 19. '%$id' doesn't work because of ",20"
Anything else aside from LIKE I can use?