Q:

Is value in a string stored in table

I have a table t1 with several columns. One of them contains a string of numeric values, and can be a single number, like 14 or be comma separated, like 3, 14, 66, 1884
I need to run a query to check if a given number is in that column. I thought I'll use "IN", but I don't think it'll be the right approach. For some reason having a brain-freeze, possibly because it's been a loooooong day and caffeine all wore out...
SELECT * FROM t1 WHERE ".$myValue." IN (t1.myStr) ...?

A:

You could use FIND_IN_SET function.
SELECT * FROM t1 WHERE FIND_IN_SET(?, myStr)

