Re: determining number of rows in a mysql table

From: Date: Tue, 30 Mar 2004 02:28:47 +0000
Subject: Re: determining number of rows in a mysql table
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-181763@lists.php.net to get a copy of this message
select count(*) from tablename Miles At 12:12 PM 3/30/2004 +1000, Chris Wagner wrote:
this should be easy... how would one go about determining the number of rows in a mysql table, without actually wasting the time of querying for *. is this the best way? $result = mysql_query('SELECT * FROM tablename'); $num_rows = mysql_num_rows($result); does this actually take up time searching? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#181763) next »