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%2Brows&lang=en
http://www.php.net/manual-lookup.php?pattern=fetch%2Brecords&lang=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



Reply via email to