jDbResultSet
in package
implements
Iterator
represent a statement result set or a prepared statement result set.
Tags
Interfaces, Classes and Traits
- Iterator
Table of Contents
- $_currentRecord : mixed
- $_fetchMode : mixed
- $_fetchModeCtoArgs : mixed
- $_fetchModeParam : mixed
- $_idResult : mixed
- $_recordIndex : mixed
- $modifier : array<string|int, callable>
- a callback function which will modify on the fly record's value.
- __construct() : mixed
- __destruct() : mixed
- addModifier() : mixed
- bindColumn() : mixed
- Bind a column to a PHP variable.
- bindParam() : mixed
- Binds a parameter to the specified variable name.
- bindValue() : mixed
- Binds a value to a parameter.
- columnCount() : mixed
- Returns the number of columns in the result set.
- current() : mixed
- execute() : mixed
- execute a prepared statement It may accepted an array of named parameters and their value, if bindValue or bindParam() did not called.
- fetch() : bool|object
- fetch a result. The result is returned as an object.
- fetchAll() : array<string|int, object>
- Return all results in an array. Each result is an object.
- fetchAllAssociative() : array<string|int, array<string|int, mixed>>
- Return all results in an array. Each result is an associative array.
- fetchAssociative() : array<string|int, mixed>|bool
- fetch a result. The result is returned as an associative array.
- free() : mixed
- getAttribute() : mixed
- Retrieve a statement attribute.
- id() : mixed
- key() : mixed
- next() : mixed
- rewind() : mixed
- rowCount() : mixed
- Returns the number of rows affected by the last SQL statement.
- setAttribute() : mixed
- Set a statement attribute.
- setFetchMode() : mixed
- set the fetch mode.
- unescapeBin() : string
- valid() : mixed
- _fetch() : bool|object
- deep implementation of fetch().
- _fetchAssoc() : array<string|int, mixed>|false
- deep implementation of fetchAssociative().
- _free() : mixed
- method responsible to free resources. called by the destructor.
- _rewind() : mixed
- move the cursor to the first record.
- applyModifiers() : mixed
Properties
$_currentRecord
protected
mixed
$_currentRecord
= \false
Tags
$_fetchMode
protected
mixed
$_fetchMode
= 0
Tags
$_fetchModeCtoArgs
protected
mixed
$_fetchModeCtoArgs
Tags
$_fetchModeParam
protected
mixed
$_fetchModeParam
Tags
$_idResult
protected
mixed
$_idResult
Tags
$_recordIndex
protected
mixed
$_recordIndex
= 0
Tags
$modifier
a callback function which will modify on the fly record's value.
protected
array<string|int, callable>
$modifier
= array()
Tags
Methods
__construct()
public
__construct(mixed $idResult) : mixed
Parameters
- $idResult : mixed
Tags
Return values
mixed —__destruct()
public
__destruct() : mixed
Tags
Return values
mixed —addModifier()
public
addModifier(callable $function) : mixed
Parameters
- $function : callable
-
a callback function the function should accept in parameter the record, and the resulset object
Tags
Return values
mixed —bindColumn()
Bind a column to a PHP variable.
public
abstract bindColumn(mixed $column, mixed &$param[, null|mixed $type = null ]) : mixed
Parameters
- $column : mixed
- $param : mixed
- $type : null|mixed = null
Tags
Return values
mixed —bindParam()
Binds a parameter to the specified variable name.
public
abstract bindParam(mixed $parameterName, mixed &$variable[, mixed $data_type = PDO::PARAM_STR ][, null|mixed $length = null ][, null|mixed $driver_options = null ]) : mixed
Parameters
- $parameterName : mixed
- $variable : mixed
- $data_type : mixed = PDO::PARAM_STR
- $length : null|mixed = null
- $driver_options : null|mixed = null
Tags
Return values
mixed —bindValue()
Binds a value to a parameter.
public
abstract bindValue(mixed $parameterName, mixed $value[, mixed $data_type = PDO::PARAM_STR ]) : mixed
Parameters
- $parameterName : mixed
- $value : mixed
- $data_type : mixed = PDO::PARAM_STR
Tags
Return values
mixed —columnCount()
Returns the number of columns in the result set.
public
abstract columnCount() : mixed
Tags
Return values
mixed —current()
public
current() : mixed
Tags
Return values
mixed —execute()
execute a prepared statement It may accepted an array of named parameters and their value, if bindValue or bindParam() did not called.
public
abstract execute([array<string|int, mixed> $parameters = null ]) : mixed
Parameters
- $parameters : array<string|int, mixed> = null
Tags
Return values
mixed —fetch()
fetch a result. The result is returned as an object.
public
fetch() : bool|object
Tags
Return values
bool|object —result object or false if there is no more result
fetchAll()
Return all results in an array. Each result is an object.
public
fetchAll() : array<string|int, object>
Tags
Return values
array<string|int, object> —fetchAllAssociative()
Return all results in an array. Each result is an associative array.
public
fetchAllAssociative() : array<string|int, array<string|int, mixed>>
Tags
Return values
array<string|int, array<string|int, mixed>> —fetchAssociative()
fetch a result. The result is returned as an associative array.
public
fetchAssociative() : array<string|int, mixed>|bool
Tags
Return values
array<string|int, mixed>|bool —result array or false if there is no more result
free()
public
free() : mixed
Tags
Return values
mixed —getAttribute()
Retrieve a statement attribute.
public
getAttribute(int $attr) : mixed
Parameters
- $attr : int
Tags
Return values
mixed —id()
public
id() : mixed
Tags
Return values
mixed —key()
public
key() : mixed
Tags
Return values
mixed —next()
public
next() : mixed
Tags
Return values
mixed —rewind()
public
rewind() : mixed
Tags
Return values
mixed —rowCount()
Returns the number of rows affected by the last SQL statement.
public
abstract rowCount() : mixed
Tags
Return values
mixed —setAttribute()
Set a statement attribute.
public
setAttribute(int $attr, mixed $value) : mixed
Parameters
- $attr : int
- $value : mixed
Tags
Return values
mixed —setFetchMode()
set the fetch mode.
public
setFetchMode(int $fetchmode[, object|string $param = null ][, array<string|int, mixed> $ctoargs = null ]) : mixed
Parameters
- $fetchmode : int
-
FETCH_OBJ, FETCH_CLASS or FETCH_INTO
- $param : object|string = null
-
class name if FETCH_CLASS, an object if FETCH_INTO. else null.
- $ctoargs : array<string|int, mixed> = null
-
arguments for the constructor if FETCH_CLASS
Tags
Return values
mixed —unescapeBin()
public
unescapeBin(string $text) : string
Parameters
- $text : string
-
a binary string to unescape
Tags
Return values
string —the unescaped string
valid()
public
valid() : mixed
Tags
Return values
mixed —_fetch()
deep implementation of fetch().
protected
abstract _fetch() : bool|object
Tags
Return values
bool|object —_fetchAssoc()
deep implementation of fetchAssociative().
protected
abstract _fetchAssoc() : array<string|int, mixed>|false
Tags
Return values
array<string|int, mixed>|false —_free()
method responsible to free resources. called by the destructor.
protected
abstract _free() : mixed
Tags
Return values
mixed —_rewind()
move the cursor to the first record.
protected
abstract _rewind() : mixed
Tags
Return values
mixed —applyModifiers()
protected
applyModifiers(mixed $result) : mixed
Parameters
- $result : mixed