A class to represent a template query, and its results.
This class accepts in it's constructor an array of filter arguments.
package |
CMS |
---|---|
license |
GPL |
since | 2.0 |
author |
Robert Campbell calguy1000@gmail.com |
see |
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.
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
__construct(mixed $args = '')
mixed
$argsAccepts an associative array (key=>value) with arguments for the query, or a comma separarated string of arguments.
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()
_totalmatchingrows :
This value is populated after execute() is called.
_offset :
_limit :
_rs :
_args :
id : integer
The stylesheet id. This will result in at most 1 result being returned.
integer
name : string
A stylesheet name to filter upon. If a partial name is provided, it is assumed to be a prefix.
string
design : integer
A design id to filter upon.
integer
sortby : string
Possible values are id,item_order,design,name Default is to sort by name.
string
sortorder : string
Possible values are ASC, DESC. Default is ASC.
string
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