I have a column in my table that contains a list of comma separated values corresponding to assorted id values from another field. None of the data types seem to handle an arbitrary array properly, so I have set the field type to VARCHAR(30).
My problem is that the IN() comparison operator does not seem to work properly in the field.
For example, in the people_id column, I have the following values: 24,45.
SELECT id from 'images' WHERE 24 IN(people_id);
Will return a value, but:
SELECT id from 'images' WHERE 45 IN(people_id);
Will return no results.
Any ideas as to choosing a better column type, so that IN() works as it should? Or even making the above query work.