* Thus wrote Phillip Blancher ([EMAIL PROTECTED]):
> 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);
try a print_r($shipping1); I'll bet your value is in there just you
arn't accessing it.
It would help if you supplied your code for trying to access your total.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php