Re: Searching Fields for a SubString

2006-11-04 Thread David T. Ashley
Thanks for the help. As often happens in these situations, a little searching and experimentation got me a workable answer before any replies arrived. In my case, I was able to use the LOCATE operator, i.e. select idx, lname,schedalonerscs from usrs where LOCATE(",7,", schedalonerscs) != 0; I'

Re: Searching Fields for a SubString

2006-11-04 Thread Dan Buettner
Dave, you could just use a LIKE statement SELECT * FROM table WHERE mystring LIKE "%,2,%" Of course if it is at the beginning or end, or the only item, it may look like '2' '2,' or ',2' and not ',2,' so this would work in all cases I think: WHERE (mystring LIKE "%,2,%" OR mystring LIKE "2,%" OR

Searching Fields for a SubString

2006-11-04 Thread David T. Ashley
Hi, I'm a little bit lost on MySQL statements. I am implementing a many:many relationship using a string (wrong way, I know, but I'm trying to keep the design simple and this is a trivial application). In a VARCHAR field, I will store a comma-delimited set of integers corresponding to the indic