I have a table with a char field (named field1) that contains a list of numbers in parens like (1,15,16,35).
I want to do a query that will select records based on user input
For example user inputs a value of 15 into variable $val so want to select the records where 15 is in the list.
I thought I could do something like:
SELECT * FROM table1 WHERE $val IN field1
It seems that you can't have a field in the table on the right of the IN for the list.
Any suggestions how I can seach a char field to see if it contains a value.
Thanks
JC