Database Abstraction Layer for PHP

User Tools

Site Tools


This is an old revision of the document!


See Also

Feature Comparison Matrix

 int recordCount()

The function recordCount() return the number of records returned by the last select statement, or -1 if the database driver does not support the operation.

If $ADODB_COUNTRECS is set to true before a query is executed, then the number of records will be retrieved, even if the function has to be emulated by issuing a COUNT * on the query. This can result in slow responses.


 * IBM DB2 database connection assumed
$result = $db->Execute('SELECT * FROM act');
$recordCount = $db->recordCount();
v5/reference/connection/recordcount.1442267658.txt.gz · Last modified: 2017/04/21 11:33 (external edit)