RE: Re: Help: Database Search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx]
> Sent: 12 November 2004 14:13
> To: Graham Cossey; Sebastian Mendel; php-general@xxxxxxxxxxxxx
> Subject: RE:  Re: Help: Database Search 
> 
> 
> 
> --- Graham Cossey <graham@xxxxxxxxxxxxxxx> 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
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux