Jelix 1.7.18

mysqliDbResultSet extends jDbResultSet
in package

Object to fetch result, wrapping the underlaying result object of mysqli.

Tags
subpackage

db_driver

Table of Contents

$_currentRecord  : mixed
$_fetchMode  : mixed
$_fetchModeCtoArgs  : mixed
$_fetchModeParam  : mixed
$_idResult  : mixed
$_recordIndex  : mixed
$_stmt  : mixed
$boundParameters  : mixed
$boundParameterTypes  : mixed
$modifier  : array<string|int, callable>
a callback function which will modify on the fly record's value.
$parameterNames  : mixed
__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.
addParamType()  : mixed
applyModifiers()  : mixed

Properties

$modifier

a callback function which will modify on the fly record's value.

protected array<string|int, callable> $modifier = array()
Tags
since
1.1.6

Methods

__construct()

public __construct(mixed $resultSet[, mixed $stmt = null ][, mixed $parameterNames = array() ]) : mixed
Parameters
$resultSet : mixed
$stmt : mixed = null
$parameterNames : mixed = array()
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
since
1.1.6
Return values
mixed

bindColumn()

Bind a column to a PHP variable.

public bindColumn(mixed $column, mixed &$param[, mixed $type = null ]) : mixed
Parameters
$column : mixed
$param : mixed
$type : mixed = null
Return values
mixed

bindParam()

Binds a parameter to the specified variable name.

public bindParam(string $parameter, mixed &$variable[, mixed $dataType = PDO::PARAM_STR ][, null|mixed $length = null ][, null|mixed $driverOptions = null ]) : mixed
Parameters
$parameter : string
$variable : mixed
$dataType : mixed = PDO::PARAM_STR
$length : null|mixed = null
$driverOptions : null|mixed = null
Return values
mixed

bindValue()

Binds a value to a parameter.

public bindValue(mixed $parameter, mixed $value[, mixed $dataType = PDO::PARAM_STR ]) : mixed
Parameters
$parameter : mixed
$value : mixed
$dataType : mixed = PDO::PARAM_STR
Return values
mixed

columnCount()

Returns the number of columns in the result set.

public columnCount() : mixed
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 execute([null|mixed $parameters = null ]) : mixed
Parameters
$parameters : null|mixed = null
Return values
mixed

fetch()

fetch a result. The result is returned as an object.

public fetch() : bool|object
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>
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>>
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
Return values
array<string|int, mixed>|bool

result array or false if there is no more result

getAttribute()

Retrieve a statement attribute.

public getAttribute(mixed $attr) : mixed
Parameters
$attr : mixed
Return values
mixed

rowCount()

Returns the number of rows affected by the last SQL statement.

public rowCount() : mixed
Return values
mixed

setAttribute()

Set a statement attribute.

public setAttribute(mixed $attr, mixed $value) : mixed
Parameters
$attr : mixed
$value : mixed
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

Return values
mixed

unescapeBin()

public unescapeBin(string $text) : string
Parameters
$text : string

a binary string to unescape

Tags
since
1.1.6
Return values
string

the unescaped string

_fetch()

deep implementation of fetch().

protected _fetch() : bool|object
Return values
bool|object

_fetchAssoc()

deep implementation of fetchAssociative().

protected _fetchAssoc() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|false

_free()

method responsible to free resources. called by the destructor.

protected _free() : mixed
Return values
mixed

_rewind()

move the cursor to the first record.

protected _rewind() : mixed
Return values
mixed

addParamType()

protected addParamType(mixed $parameter, mixed $dataType) : mixed
Parameters
$parameter : mixed
$dataType : mixed
Return values
mixed

applyModifiers()

protected applyModifiers(mixed $result) : mixed
Parameters
$result : mixed
Return values
mixed

Search results