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

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

 



On Mon, Dec 22, 2003 at 11:43:35AM +0900, Lew Mark-Andrews wrote:
> Table structure for cardlist:
>   `visitdate` datetime default NULL,

> $sql = "SELECT COUNT(visitdate) FROM cardlist GROUP BY visitdate";

> $visitcount = mysql_num_rows($query);

> echo "<p>Total number of visits: $visitcount</p><br>"; // <--- Should be zero.


I think that there is one visitdate (NULL), so one row is returned.

HTH,
Tobey Wheelock

-- 
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