EmptyResultset View code

Extends \CMSMS\Database\Resultset

A final class to describe a special (empty) recordset.

ignore
package

Default

Methods

MoveFirst() 

Move to the first row in a resultset.

inherited abstract
MoveNext() 

Move to the next row of a resultset.

inherited abstract
Move(integer $idx) 

Move to a specified index of the resultset.

inherited abstract

Arguments

integer $idx

GetArray() : array

Get all remaining results in this resultset as an array of records.

inherited

Response

array

GetRows() : array

An alias for the GetArray method.

inherited deprecated

Response

array

GetAll() : array

An alias for the GetArray method.

inherited deprecated

Response

array

GetAssoc( $force_array = false,  $first2cols = false) : array

Get an associative array from a resultset.

inherited deprecated

If only two columns are returned in the resultset, the keys of the returned associative array will be the value of the first column, and the value of each key will be the value from the second column.

If more than 2 columns are returned, then the key of the returned associative array will be the value from the first column, and the value of each key will be an associative array of the remaining columns. This is known as array behavior.

Arguments

$force_array

$first2cols

Response

array

EOF() : boolean

Test if we are at the end of a resultset, and there are no further matches.

inherited abstract

Response

boolean

Close() 

Close the current resultset.

inherited abstract
RecordCount() : integer

Return the number of rows in the current resultset.

inherited abstract

Response

integer

NumRows() : integer

Alias for the RecordCount() method.

inherited

Response

integer

Fields(string $field = null) : mixed|array

Return the fields of the current resultset, or a single field of it.

inherited abstract

Arguments

string $field

An optional field name, if not specified, the entire row will be returned.

Response

mixed|array

Either a single value, or an array

FetchRow() : array

Fetch the current row, and move to the next row.

inherited

Response

array

Properties

EOF

EOF : boolean
inherited

Test if we are at the end of the current resultset.

Type(s)

boolean

fields

fields : array
inherited

Return the current row of the resultset.

Type(s)

array