Re: count rows

From: Date: Fri, 22 Aug 2003 08:00:13 +0000
Subject: Re: count rows
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-160405@lists.php.net to get a copy of this message
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.

« previous php.general (#160405) next »