note 13892 added to function.mysql-num-rows.php
| From: | Peter at BrainPeak dot com | Date: | Mon, 09 Jul 2001 01:53:31 +0000 |
| Subject: | note 13892 added to function.mysql-num-rows.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15108@lists.php.net to get a copy of this message | ||
I don't know if this is always the case, but I found mysql_num_rows to be extremely slow!
Instead, I use this:
$result = mysql_fetch_array(mysql_db_query($database, $query));
$NumRows = count($result);
http://www.php.net/manual/en/function.mysql-num-rows.php