[PHP] count rows

2003-08-22 Thread John Taylor-Johnston
Help me out here. I want to get a numeral on the number of records in a table.
What is the function?

http://www.php.net/manual-lookup.php?pattern=fetch%2Browslang=en
http://www.php.net/manual-lookup.php?pattern=fetch%2Brecordslang=en

? :)
John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] count rows

2003-08-22 Thread [EMAIL PROTECTED]
mysql_num_rows gives the number of rows. But don't even think of doing 
it this way if you just want the number of rows and don't want the data.

The correct way is to use a query such as
[sql]
   select count(*) from table
[/sql]
this will return just one row and it wil tell you how many rows are in 
your table and your database will be a lot happier :-)

John Taylor-Johnston wrote:

Help me out here. I want to get a numeral on the number of records in a table.
What is the function?
http://www.php.net/manual-lookup.php?pattern=fetch%2Browslang=en
http://www.php.net/manual-lookup.php?pattern=fetch%2Brecordslang=en
? :)
John
 



--
http://www.raditha.com/php/progress.php
A progress bar for PHP file uploads.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php