note 18721 added to function.mysql-result
| From: | anon at hotmail dot com | Date: | Fri, 01 Feb 2002 21:15:20 +0000 |
| Subject: | note 18721 added to function.mysql-result | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26142@lists.php.net to get a copy of this message | ||
Not really convinced that this subject *needs* any more notes, but ...
I am looking for something simple/elegant to report the the number of items in a table.
At the moment I am using this:
$result = mysql_fetch_array(mysql_query("select count(*) from photos"));
$total = $result["count(*)"];
Anything better anyone ?
I admit I am a newbie, but some of the above seems obtuse for the hell of it.
--
http://www.php.net/manual/en/function.mysql-result.php
http://master.php.net/manage/user-notes.php?action=edit+18721
http://master.php.net/manage/user-notes.php?action=delete+18721
http://master.php.net/manage/user-notes.php?action=reject+18721