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,





 $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";





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

Reply via email to