$result = mysql_query("SELECT any_name_of_column FROM table_name", $db);
if (mysql_num_rows($result)==0)
{
echo "the table is empty ";
}
check the manual under mysql functions there are a lot of very useful
functions there.
kill-9
www.kill-9.dk
for all your mysql and php needs
----- Original Message -----
From: "afan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 11, 2001 9:24 PM
Subject: [PHP-WIN] Probably there is better solution
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]