Re: mySQL select statement with mulitple where definitions

From: Date: Wed, 16 Jan 2002 19:59:25 +0000
Subject: Re: mySQL select statement with mulitple where definitions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80805@lists.php.net to get a copy of this message
on 1/16/02 11:57 AM, Mike Krisher at mike@twopeoplecommunicating.com wrote: > someone here has to know the syntax for using multiple items in a where > definition, something like: > > $values = 120106,120095; > $sql = "SELECT * FROM products WHERE catalognumber = $values ORDER BY > price"; > select * from products where catalognumber in (120106,120095) order by you may need quotes around the stuff in the parens, ('120106','120095') -- mike cullerton michaelc at cullerton dot com

« previous php.general (#80805) next »