Re: Probably there is better solution
| From: | Jan Walter | Date: | Thu, 11 Jan 2001 17:45:37 +0000 |
| Subject: | Re: Probably there is better solution | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4923@lists.php.net to get a copy of this message | ||
afan wrote:
> 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";
Hi Afan,
try query SELECT COUNT(*) FROM table_name.
--
__________________________________________________________________________________________
==========================================================================================
Jan Walter, called John
LERACH, s.r.o.
phone nr. work: +420-2-78 22 619, home: +420-2-35 35 27 61
on emergency call cell phone: +420-602-385 760
work e-mail mailto:Jan.Walter@lerach.cz
private e-mail mailto:john@lerach.cz
ICQ#: 28353428
__________________________________________________________________________________________
==========================================================================================