RE: multiple WHERE's

From: Date: Mon, 20 Oct 2003 16:38:15 +0000
Subject: RE: multiple WHERE's
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31196@lists.php.net to get a copy of this message
Try this, I am assuming that emailerror is one of the fields in your database. $thisstart=$massmail[current]-1; $users=@mysql_query("select first_name,last_name,email,".$mysql_prefix."users.username from ".$mysql_prefix."users $leftjoinfirst $leftjoinsecond limit $thisstart,$massmail[stop] where vacation<'$curdate' and emailerror = n"); @mysql_query("drop table tmpcmailcttbl"); while ($user=@mysql_fetch_array($users)) -----Original Message----- From: JeRRy [mailto:jusa_98@yahoo.com] Sent: Saturday, October 18, 2003 10:07 PM To: php-db@lists.php.net Subject: multiple WHERE's Hi, I have this code that I want to have multiple WHERE statements. Could someone help me please. What I want added is: WHERE emailerror = n So if 'emailerror = y' it wont send an eamil but if set to 'n' it will. Code below... $thisstart=$massmail[current]-1; $users=@mysql_query("select first_name,last_name,email,".$mysql_prefix."users.username from ".$mysql_prefix."users $leftjoinfirst where vacation<'$curdate' $leftjoinsecond limit $thisstart,$massmail[stop]"); @mysql_query("drop table tmpcmailcttbl"); while ($user=@mysql_fetch_array($users)) Jerry http://personals.yahoo.com.au - Yahoo! Personals New people, new possibilities. FREE for a limited time.

« previous php.db (#31196) next »