Properties

$result

$result : resource

Type

resource — The result resource

$mode

$mode : string

Type

string — The type of database this result set is for

$position

$position : integer

Type

integer — The current (zero based) position in the result set

$fetchStyle

$fetchStyle : integer

Type

integer — The current fetch style (one of the Sql::FETCH_ constants)

Methods

fetchStyle()

fetchStyle(integer  $style) : void

Set the fetch style used by future calls to the fetch() method

Parameters

integer $style

One of the fetch style constants from the Sql class (Sql::FETCH_ROW or Sql::FETCH_ASSOC)

fetch()

fetch(integer  $style = null) : array|null

Fetch the next row from the result set and clean it up

All field values have rtrim() called on them to remove trailing space All column keys have strtolower() called on them to convert them to lowercase (for consistency across database engines)

Parameters

integer $style

One of the fetch style constants from the Sql class (Sql::FETCH_ROW, Sql::FETCH_ASSOC or Sql::FETCH_RAW)

Returns

array|null

generator()

generator() 

Get a generator function to fetch from

result()

result(integer  $row, integer  $col) : string

Fetch an indiviual value from the result set

Parameters

integer $row

The index of the row to fetch (zero-based)

integer $col

The index of the column to fetch (zero-based)

Returns

string

seek()

seek(integer  $row) : void

Seek to a specific record of the result set

Parameters

integer $row

The index of the row to position to (zero-based)

columnCount()

columnCount() : integer

Get the number of columns in the result set

Returns

integer

current()

current() 

http://php.net/manual/en/class.iterator.php

key()

key() 

http://php.net/manual/en/class.iterator.php

next()

next() 

http://php.net/manual/en/class.iterator.php

rewind()

rewind() 

http://php.net/manual/en/class.iterator.php

valid()

valid() 

http://php.net/manual/en/class.iterator.php

__construct()

__construct(mixed  $result, string  $mode) : void

Create a Result instance to provide extra functionality

Parameters

mixed $result

The result resouce returned by executed a query

string $mode

The Sql engine mode that this result was generated by

_fetch()

_fetch() 

Old method of a raw fetch

count()

count() : integer

Get the number of rows in the result set

Returns

integer

free()

free() : void

Free the memory used by the result resource

__destruct()

__destruct() : void

If the result source is still available then free it before tearing down the object

getNextRow()

getNextRow() : array|null

Internal method to fetch the next row from the result set

Returns

array|null