Check out mysql_num_rows and the COUNT function in MySQL: both are
good, quick ways of getting that number without looping through your
whole result set.

 Gonzalo.

> Hi all,

> I have to know how many entries I have in table/database. Usually, I use
 
> $result = mysql_query("SELECT any_name_of_column FROM table_name", $db);
>  while($myrow = mysql_fetch_array($result));
>  {
>   $Counter++;
>  }
> echo"No of entries: $Checker<br>\n";

> Probably there is better and faster solution.

> Thanks for any help!

> Afan



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to