Forum Moderators: open

Message Too Old, No Replies

Searching method for info that is comma delineated?

         

darkus

1:45 am on Jul 21, 2007 (gmt 0)

10+ Year Member



I have a table inside mysql that contains a set of values separated by commas

For example

ID FRIENDids
1 3,5,7,2
2 18,20,40,33
3 22,12,421,22

Now is there any way of using a select statement to pic out the row that contains the value 5 for example?

I know the comma separated values screws things up, but there might be a way to still do this?

Thanks!

coopster

11:42 am on Jul 23, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, darkus.

FIND_IN_SET [webmasterworld.com] might work for you.