Paging / Navigation Help

From: Date: Thu, 12 Dec 2002 19:56:25 +0000
Subject: Paging / Navigation Help
Groups: php.general 
Request: Send a blank email to php-general+get-128056@lists.php.net to get a copy of this message
Hello ALL. Can anyone tell me why the number of rows is always 1 and count is the total number of records in my database. Thanks in Advance, William [snip] <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <?php $db = mysql_connect("localhost", "root"); mysql_select_db("dallas", $db); $result = mysql_query("SELECT COUNT(*) as count FROM partscatalog having count >0;",$db); //get number of rows returned $number_of_rows = mysql_num_rows($result); if ($number_of_rows != '0') { while ($myrow = mysql_fetch_array($result)) { echo "\$number_of_rows is $number_of_rows"; echo "count: ".$myrow["count"]."<br>\n"; } } ?> </body> </html> [/snip]

« previous php.general (#128056) next »