class ArrayStatement implements IteratorAggregate, ResultStatement (View source)

Methods

__construct(array $data)

No description

boolean
closeCursor()

Closes the cursor, enabling the statement to be executed again.

integer
columnCount()

columnCount Returns the number of columns in the result set

setFetchMode($fetchMode, $arg2 = null, $arg3 = null)

setFetchMode Set the fetch mode to use while iterating this statement.

getIterator()

No description

mixed
fetch(integer $fetchMode = null)

fetch

array
fetchAll(integer $fetchMode = null)

Returns an array containing all of the result set rows

string
fetchColumn(integer $columnIndex = 0)

fetchColumn Returns a single column from the next row of a result set or FALSE if there are no more rows.

Details

__construct(array $data)

Parameters

array $data

boolean closeCursor()

Closes the cursor, enabling the statement to be executed again.

Return Value

boolean Returns TRUE on success or FALSE on failure.

integer columnCount()

columnCount Returns the number of columns in the result set

Return Value

integer Returns the number of columns in the result set represented by the PDOStatement object. If there is no result set, this method should return 0.

setFetchMode($fetchMode, $arg2 = null, $arg3 = null)

setFetchMode Set the fetch mode to use while iterating this statement.

Parameters

$fetchMode
$arg2
$arg3

getIterator()

mixed fetch(integer $fetchMode = null)

fetch

Parameters

integer $fetchMode Controls how the next row will be returned to the caller. This value must be one of the Query::HYDRATE_* constants, defaulting to Query::HYDRATE_BOTH

Return Value

mixed

array fetchAll(integer $fetchMode = null)

Returns an array containing all of the result set rows

Parameters

integer $fetchMode Controls how the next row will be returned to the caller. This value must be one of the Query::HYDRATE_* constants, defaulting to Query::HYDRATE_BOTH

Return Value

array

string fetchColumn(integer $columnIndex = 0)

fetchColumn Returns a single column from the next row of a result set or FALSE if there are no more rows.

Parameters

integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no value is supplied, PDOStatement->fetchColumn() fetches the first column.

Return Value

string returns a single column in the next row of a result set.