RE: [PHP] Re: Help: Database Search

From: Date: Fri, 12 Nov 2004 14:21:50 +0000
Subject: RE: [PHP] Re: Help: Database Search
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-201845@lists.php.net to get a copy of this message
What I meant was that the $sql variable should contain a where clause of "WHERE vendorjobs.Industry IN (2,3,5)" if you had a multi-element array or "WHERE vendorjobs.Industry = 2" if you had a single-element array. The IN statement is easier to construct than multiple ORs and tends to run faster as well. Graham > -----Original Message----- > From: Stuart Felenstein [mailto:stuart4m@yahoo.com] > Sent: 12 November 2004 14:13 > To: Graham Cossey; Sebastian Mendel; php-general@lists.php.net > Subject: RE: [PHP] Re: Help: Database Search > > > > --- Graham Cossey <graham@cossey.plus.com> wrote: > > > This should result in: > > > > WHERE vendorjobs.Industry IN (2,3,5) > > > > OR > > > > WHERE vendorjobs.Industry = 2 > > > > HTH > > Graham > > Not sure what you mean by the above ? > > Stuart > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#201845) next »