Re: COUNT() returns 1, but should be 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John,

>That's because you're displaying how many "rows" were returned from the
>query, not the value that COUNT() returns. A query with COUNT() is
>always going to return at least one row.
>
>$visitcount = mysql_result($query,0);

Yes, that was it! Thank you so much.

Lew

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux