\duncan3dc\SqlClassAbstractResult

Summary

Methods
Properties
Constants
fetchStyle()
fetch()
generator()
result()
seek()
columnCount()
current()
key()
next()
rewind()
valid()
No public properties found
No constants found
getNextRow()
$position
$fetchStyle
N/A
No private methods found
No private properties found
N/A

Properties

$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

getNextRow()

getNextRow() : array|null

Internal method to fetch the next row from the result set

Returns

array|null