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

Next revision
Previous revision
Last revisionBoth sides next revision
reference:po_recordcount [2015/07/25 06:47] – created mnewnhamv5:reference:po_recordcount [2016/01/13 02:31] – ↷ Page moved from reference:po_recordcount to v5:reference:po_recordcount mnewnham
Line 2: Line 2:
 <WRAP right box> <WRAP right box>
 == See Also == == See Also ==
-[[database:feature_comparison|Feature Comparison Matrix]]+[[v5:database:feature_comparison|Feature Comparison Matrix]]\\ 
 +[[reference:ADODB_COUNTRECS]]\\
 == Syntax == == Syntax ==
    int po_recordCount()    int po_recordCount()
 </WRAP> </WRAP>
-The function ''po_recordCount()'' return the number of records returned by the last select statement. This portable function uses a **SELECT COUNT** function to determine the number of records. There may be a substantial overhead to using this function on large recordsets.+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 ===== ===== Usage =====
 <code php> <code php>
 /* /*
- IBM DB2 database connection assumed+ Access database connection assumed
  */  */
-$result = $db->Execute('SELECT * FROM act'); +$result = $db->Execute('SELECT * FROM products'); 
-$recordCount = $db->recordCount();+$recordCount = $db->po_recordCount();
 </code> </code>
  
v5/reference/connection/po_recordcount.txt · Last modified: 2016/01/17 01:15 by mnewnham