[ciapug] Adodb: RecordCount()

Chris Hettinger ciapug@cialug.org
Fri, 24 Oct 2003 09:20:19 -0500


I am having a small issue with the Adodb (version 4.01) function =
RecordCount().
Here is the documentation on this function: =
http://phplens.com/lens/adodb/docs-adodb.htm#recordcount

Example:
$sql =3D "SELECT * FROM states";
$results =3D $db->Execute($sql);

// result set should then list 50 records

I am having an issue with the syntax to use this function.... I would =
assume I would need pass it my result set or the query??? I have tried =
several different ways...

$count =3D RecordCount($sql);

or

$count =3D $db->RecordCount($sql);

... No matter what I try I receive the error: Fatal error: Call to =
undefined function: recordcount()...

I want to know the number of records returned in my result set. I don't =
want to use a counter and while loop to do this.

-Chris Hettinger, Web Specialist
-IFMC/ENCOMPASS
-www.encompas.com
-(515) 279-8730



CONFIDENTIALITY NOTICE:  This communication, including any attachment, =
may contain confidential information and is intended only for the =
individual or entity to whom it is addressed.  Any review, =
dissemination, or copying of this communication by anyone other than the =
intended recipient is strictly prohibited.  If you are not the intended =
recipient, please contact the sender by reply email, delete and destroy =
all copies of the original message.'