Re: Re: [PHP] What's wrong with this IF statement?

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

 




 if ($cat_id != "53" || $cat_id != "54" || $cat_id != "55" || $cat_id
!= "117" || $cat_id != "118" || $cat_id != "74")


anyone else see the problem with the IN clause instead:

ie.

if !($cat in (53, 54, 55, 117, 118, 74))...

makes building SQL statements much easier. especially with mutiple SELECTS in a pull down form object.

--
Leo G. Divinagracia III
ldivinag@xxxxxxxxxxxxxx

zzzzz

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux