note 18721 deleted from function.mysql-result by zak

From: Date: Sat, 02 Feb 2002 08:59:30 +0000
Subject: note 18721 deleted from function.mysql-result by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-26153@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.

« previous php.notes (#26153) next »