An abstract class for building queries and managing results.
This class is capable of managing a resultset, and encapsulates conversionof database rows into application objects.
since | 2.0 |
---|---|
package |
CMS |
license |
GPL |
author |
Robert Campbell calguy1000@gmail.com |
property-read |
Associative array of the current row of the resultset (read only) |
property-read |
Indicates wether the resultset is past the last element (read only) |
property-read |
The maximum number of rows to return in one resultset (read only) |
property-read |
The start offset of rows to return when executing the query (read only) |
property-read |
The total number of rows in the database that match the query (read only) |
property-read |
The total number of pages of rows that match the query (read only) |
__construct(mixed $args = '')
mixed
$argsAccepts an associative array (key=>value) with arguments for the query, or a comma separarated string of arguments.
execute()
This method should read the parameters, build and execute the database query and populate the $_totalmatchingrows and $_rs members.
This method should be smart enough to not execute the database query more than once independent of how many times it is called.
TotalMatches() : integer
If execute has not already been called, this method will call it.
integer
RecordCount() : integer
If execute has not already been called, this method will call it.
integer
MoveNext()
If execute has not been called yet, this method will call it.
MoveFirst()
If execute has not been called yet, this method will call it.
Rewind()
This is a synonym for MoveFirst()
If execute has not been called yet, this method will call it.
MoveLast()
If execute has not been called yet, this method will call it.
EOF() : boolean
boolean
Close()
GetObject() : mixed
mixed
GetMatches() : array|null
This method will iterate through all of the rows of the resultset, and convert each resulting row into an object.
The output of this method depends on the derived class.
array|null
_totalmatchingrows :
This value is populated after execute() is called.
_offset :
_limit :
_rs :
_args :
fields : array
Associative array of the current row of the resultset (read only)
array
EOF : boolean
Indicates wether the resultset is past the last element (read only)
boolean
limit : integer
The maximum number of rows to return in one resultset (read only)
integer
offset : integer
The start offset of rows to return when executing the query (read only)
integer
totalrows : integer
The total number of rows in the database that match the query (read only)
integer
numpages : integer
The total number of pages of rows that match the query (read only)
integer