ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:adodb_countrecs

This is an old revision of the document!


$ADODB_COUNTRECS

TypeBoolean
DefaultTrue
See Also

po_recordcount

If a driver has native support for returning the number of records returned in an SELECT statement, then recordcount will automatically return the number of rows requested in the quert. In drivers that have no native support, then the result can be emulated by setting $ADODB_COUNTRECS to true before the statement is executed.

Note that if the value is set to true for databases without native support, the memory/query time overhead may be substantial for large recordsets. If the value is set to false then the value returned is always -1

Syntax

$SQL = "SELECT * FROM large_table";
 
$ADODB_COUNTRECS = false;
 
$db->Execute($SQL);
v5/reference/adodb_countrecs.1452648713.txt.gz · Last modified: 2017/04/21 11:32 (external edit)