note 61315 deleted from ref.mysql by nlopess
| From: | nlopess@php.net | Date: | Tue, 31 Jan 2006 23:02:04 +0000 |
| Subject: | note 61315 deleted from ref.mysql by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-102794@lists.php.net to get a copy of this message | ||
Note Submitter: Jay
----
Re:Joe
That is bad practice for counting rows, something like this is more appropriate:
<?php
$query = "SELECT COUNT(*) FROM " . $table;
$result = mysql_query($query);
$rows = mysql_fetch_row($result, 0, 0);
echo "$table contains $rows row(s)";
?>