Re: [PHP] explode in mysql query

2007-04-27 Thread Richard Lynch
On Fri, April 27, 2007 1:33 am, Sebe wrote: > i have a mysql column that looks like this: > > groups > --- > 12,7,10,6,14,11,2 > > is it possible to select the row if `groups` contain 7 or 14? > trying to avoid running two queries and running explode() on it. > > i don't remember but i thought

RE: [PHP] explode in mysql query

2007-04-27 Thread Buesching, Logan J
> -Original Message- > From: Paul Novitski [mailto:[EMAIL PROTECTED] > Sent: Friday, April 27, 2007 3:01 AM > To: php-general@lists.php.net > Subject: Re: [PHP] explode in mysql query > > At 4/26/2007 11:33 PM, Sebe wrote: > >i have a mysql column that loo

Re: [PHP] explode in mysql query

2007-04-27 Thread Sebe
Paul Novitski wrote: At 4/26/2007 11:33 PM, Sebe wrote: i have a mysql column that looks like this: groups --- 12,7,10,6,14,11,2 is it possible to select the row if `groups` contain 7 or 14? trying to avoid running two queries and running explode() on it. I would think a more efficient

Re: [PHP] explode in mysql query

2007-04-27 Thread Paul Novitski
At 4/26/2007 11:33 PM, Sebe wrote: i have a mysql column that looks like this: groups --- 12,7,10,6,14,11,2 is it possible to select the row if `groups` contain 7 or 14? trying to avoid running two queries and running explode() on it. I would think a more efficient strategy would be a si

Re: [PHP] explode in mysql query

2007-04-26 Thread Zoltán Németh
2007. 04. 27, péntek keltezéssel 02.33-kor Sebe ezt írta: > i have a mysql column that looks like this: > > groups > --- > 12,7,10,6,14,11,2 > > is it possible to select the row if `groups` contain 7 or 14? you'd better put the groups info in a separate table, referenced by this table. then

[PHP] explode in mysql query

2007-04-26 Thread Sebe
i have a mysql column that looks like this: groups --- 12,7,10,6,14,11,2 is it possible to select the row if `groups` contain 7 or 14? trying to avoid running two queries and running explode() on it. i don't remember but i thought there was a way to use explode() on something like this wit