Methods

getResult()

getResult(string  $type = 'object') : mixed

Retrieve the results of the query. Typically an array of individual data rows, which can be either an 'array', an 'object', or a custom class name.

Parameters

string $type

The row type. Either 'array', 'object', or a class name to use

Returns

mixed

getCustomResultObject()

getCustomResultObject(string  $className) : mixed

Returns the results as an array of custom objects.

Parameters

string $className

The name of the class to use.

Returns

mixed

getResultArray()

getResultArray() : array

Returns the results as an array of arrays.

If no results, an empty array is returned.

Returns

array

getResultObject()

getResultObject() : array

Returns the results as an array of objects.

If no results, an empty array is returned.

Returns

array

getRow()

getRow(mixed  $n, string  $type = 'object') : mixed

Wrapper object to return a row as either an array, an object, or a custom class.

If row doesn't exist, returns null.

Parameters

mixed $n

The index of the results to return

string $type

The type of result object. 'array', 'object' or class name.

Returns

mixed

getCustomRowObject()

getCustomRowObject(integer  $n, string  $className) : mixed

Returns a row as a custom class instance.

If row doesn't exists, returns null.

Parameters

integer $n
string $className

Returns

mixed

getRowArray()

getRowArray(integer  $n) : mixed

Returns a single row from the results as an array.

If row doesn't exist, returns null.

Parameters

integer $n

Returns

mixed

getRowObject()

getRowObject(integer  $n) : mixed

Returns a single row from the results as an object.

If row doesn't exist, returns null.

Parameters

integer $n

Returns

mixed

setRow()

setRow(  $key, null  $value = null) : mixed

Assigns an item into a particular column slot.

Parameters

$key
null $value

Returns

mixed

getFirstRow()

getFirstRow(string  $type = 'object') : mixed

Returns the "first" row of the current results.

Parameters

string $type

Returns

mixed

getLastRow()

getLastRow(string  $type = 'object') : mixed

Returns the "last" row of the current results.

Parameters

string $type

Returns

mixed

getNextRow()

getNextRow(string  $type = 'object') : mixed

Returns the "next" row of the current results.

Parameters

string $type

Returns

mixed

getPreviousRow()

getPreviousRow(string  $type = 'object') : mixed

Returns the "previous" row of the current results.

Parameters

string $type

Returns

mixed

getUnbufferedRow()

getUnbufferedRow(string  $type = 'object') : mixed

Returns an unbuffered row and move the pointer to the next row.

Parameters

string $type

Returns

mixed

getFieldCount()

getFieldCount() : integer

Gets the number of fields in the result set.

Returns

integer

getFieldNames()

getFieldNames() : array

Generates an array of column names in the result set.

Returns

array

getFieldData()

getFieldData() : array

Generates an array of objects representing field meta-data.

Returns

array

freeResult()

freeResult() : void

Frees the current result.

dataSeek()

dataSeek(integer  $n) : mixed

Moves the internal pointer to the desired offset. This is called internally before fetching results to make sure the result set starts at zero.

Parameters

integer $n

Returns

mixed