COUNT(*)
| From: | Yury B . | Date: | Thu, 31 Jul 2003 17:46:40 +0000 |
| Subject: | COUNT(*) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-157903@lists.php.net to get a copy of this message | ||
Hi
I used to use old fashioned mysql quieries but moderm mysql
apparently became more flexible so. I want to understand how to use
some of the new features like COUNT(*)
Let's say I have
$result="SELECT COUNT(*) FROM pet";
$sql=mysql_query($result);
while ($row=mysql_fetch_array($sql)){
$pet_name=$row['pet_name'];
echo ......;
}
the question is how do I actually retrieve the number of rows of sql
query result?
Yury