MySQL/PHP problem.

From: Date: Tue, 22 Jul 2003 21:08:50 +0000
Subject: MySQL/PHP problem.
Groups: php.general 
Request: Send a blank email to php-general+get-156335@lists.php.net to get a copy of this message
I am trying to count in mySQL the number of entries in the field "day" where day=2 or 3. Then I want to check just to see if that returned a value greater than 0 or not. I am using the code below, but having a problem, I keep getting 0 as the total What am i doing wrong. $dbqueryshipping1 = "select *, COUNT(day) from tempuserpurchase where day=\"2\" and day=\"3\" GROUP BY itemname"; $resultshipping1 = mysql_db_query($dbname,$dbqueryshipping1); if(mysql_error()!=""){echo mysql_error();} $shipping1 = mysql_fetch_array($resultshipping1); Thanks in advance, Phil --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003

« previous php.general (#156335) next »