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

From: Date: Mon, 22 Dec 2003 03:29:47 +0000
Subject: Re: COUNT() returns 1, but should be 0
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-32150@lists.php.net to get a copy of this message
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

« previous php.db (#32150) next »