Re: Multiple values in SELECT query

From: Date: Sun, 09 Mar 2008 19:38:50 +0000
Subject: Re: Multiple values in SELECT query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-44730@lists.php.net to get a copy of this message
I like the "IN" keyword: SELECT * FROM table WHERE name LIKE "ABC" AND listing_type IN ('1','2'); works kinda like PHP's "in_array" -- matt On Sun, Mar 9, 2008 at 1:34 PM, Ron Piggott <ron.php@actsministries.org> wrote: > What is the correct syntax for where the results may be 1 or 2? What > have I done wrong? > > SELECT * FROM table WHERE name LIKE "ABC" AND listing_type = 1 or 2 > > ??? > > Ron > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.db (#44730) next »