Re: count() problem :D

From: Date: Sat, 28 Apr 2001 04:30:51 +0000
Subject: Re: count() problem :D
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50724@lists.php.net to get a copy of this message
On 27 Apr 2001 19:50:04 -0700, Chris Schneck <chris@hubcityhosting.com> wrote: >anywho, im having problems getting data out of the count() function i've >implemented, could anyone lend a hand? > > $query = "select count(fld_gender) from tbl_survey"; > >how exactly is it that you output data retrieved from a count() >implementation? The same way you retrieve data from any other query - SQL functions like count() or sum() return data in the same fashion as normal, non-computed data. As an example: $foo = mysql_query("select count(*) from table"); echo "Number of records in table: " . mysql_result($foo, 0);

« previous php.general (#50724) next »