Re: SELECT query with multiple "WHERE" Clause
| From: | Stephen Johnson | Date: | Thu, 28 Feb 2008 00:03:05 +0000 |
| Subject: | Re: SELECT query with multiple "WHERE" Clause | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-44687@lists.php.net to get a copy of this message | ||
$query = mysql_query("SELECT * from gig WHERE gigName='$gig_name' or
gig_fdate='$sdate'");
You can not use more then one WHERE in your sql statement... And SQL accepts
OR and AND..
--
Stephen Johnson c | eh
The Lone Coder
http://www.thelonecoder.com
continuing the struggle against bad code
http://www.fortheloveofgeeks.com
I¹m a geek and I¹m OK!
--
> From: Nasreen Laghari <nasreen_laghari@yahoo.com>
> Date: Wed, 27 Feb 2008 15:44:23 -0800 (PST)
> To: <php-db@lists.php.net>
> Subject: [PHP-DB] SELECT query with multiple "WHERE" Clause
>
>
>
> $query = mysql_query("SELECT * from gig WHERE gigName='$gig_name' ||
> gig_fdate='$sdate'");