Forum Moderators: coopster
$query_count = "SELECT count(*) as `Num` FROM pharmacy";
$result_count = mysql_query($query_count);
$row = mysql_fetch_array($result_count);
$totalrows = $row['Num'];
echo 'totalrows = '.$totalrows;
The reason it was '1' in your example is shown by the query that you did. It returns '3', which is '1' row. If you are selecting the count in the query then there is no need to count the results rows, and actually it's not correct. All you want if the info that is returned from mysql.
Good luck!