ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:po_recordcount

po_recordCount

See Also

Feature Comparison Matrix
ADODB_COUNTRECS

Syntax
 int po_recordCount()

The function po_recordCount() return the number of records returned by the last select statement.

This portable function executes a SELECT COUNT statement based on the last SQL statement to determine the number of records if the database does not natively support row counting in a select statement.

There may be a substantial overhead to using this function on large recordsets.


Usage

/*
 * Access database connection assumed
 */
$result = $db->Execute('SELECT * FROM products');
$recordCount = $db->po_recordCount();
v5/reference/connection/po_recordcount.txt · Last modified: 2016/01/17 01:15 by mnewnham