ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:po_recordcount

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
reference:po_recordcount [2015/12/04 16:08] mnewnhamv5:reference:connection:po_recordcount [2016/01/17 01:15] (current) – ↷ Page moved from v5:reference:po_recordcount to v5:reference:connection:po_recordcount mnewnham
Line 1: Line 1:
 +====== po_recordCount =====
 +<WRAP right box>
 +== See Also ==
 +[[v5:database:feature_comparison|Feature Comparison Matrix]]\\
 +[[reference:ADODB_COUNTRECS]]\\
 +== Syntax ==
 +   int po_recordCount()
 +</WRAP>
 +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 =====
 +<code php>
 +/*
 + * Access database connection assumed
 + */
 +$result = $db->Execute('SELECT * FROM products');
 +$recordCount = $db->po_recordCount();
 +</code>
  
v5/reference/connection/po_recordcount.txt · Last modified: 2016/01/17 01:15 by mnewnham