parse by delimiter and search a data field?
hi all -- i need some help.
here's my table:
id | stringOfNums
-----------------
01 | '8,3,17,22'
02 | '2,9,15,43'
03 | '11,2,88,5'
03 | '4,65,41,7'
is there a way for mysql to retrieve the "id" of every row where the stringOfNums contains either "2" or "4"?
i guess my query would look something like this:
SELECT id FROM table WHERE stringOfNums CONTAINS(2,4)
i know there is another way to do this involving the creation of a brand new table, but i have a lot of data fields similar to this one and it would spawn the growth of a whole crapload of skinny new tables... i rather not go down that road.
thanks for any help,
charlie
Edited 1 time(s). Last edit at 04/27/2009 07:42PM by Charles Tronolone.