RE: [PHP] confused about logic

From: Date: Fri, 19 Mar 2004 17:02:22 +0000
Subject: RE: [PHP] confused about logic
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180980@lists.php.net to get a copy of this message
Chris! Thanks so much. This worked perfectly!!!! Aaron > -----Original Message----- > From: Chris Boget [mailto:chris@wild.net] > Sent: March 19, 2004 10:59 AM > To: Aaron Wolski; php-general@lists.php.net > Subject: Re: [PHP] confused about logic > > > To enter multiple order numbers they can comma separate like: > > 1,34,21,34,54 > > What I need to do is take those numbers and make a query that would like > > like: > > (cart_id in('1','34','21','34','54') OR > > id in('1','34','21','34','54')) > > ANY idea how I can accomplish this? > > $string = "'" . implode( "', '", explode( ',', > '1,34,21,34,54' )) . "'"; > > echo "(cart_id in( $string ) OR id in( $string ))"; > > Chris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#180980) next »