Result
in package
Class Result.
Table of Contents
Properties
- $buffered : bool
- $fetchClass : string
- $fetchConstructor : array<string|int, mixed>
- $free : bool
- $result : mysqli_result<int, array<string|int, mixed>|false|null>
Methods
- __construct() : mixed
- Result constructor.
- __destruct() : mixed
- fetch() : object|null
- Fetches the current row as object and move the cursor to the next.
- fetchAll() : array<int, object>
- Fetches all rows as objects.
- fetchArray() : array<string, float|int|string|null>|null
- Fetches the current row as array and move the cursor to the next.
- fetchArrayAll() : array<int, array<string|int, mixed>>
- Fetches all rows as arrays.
- fetchArrayRow() : array<string, float|int|string|null>
- Fetches a specific row as array and move the cursor to the next.
- fetchFields() : array<int, Field>
- Returns an array of objects representing the fields in a result set.
- fetchRow() : object
- Fetches a specific row as object and move the cursor to the next.
- free() : void
- Frees the memory associated with a result.
- isBuffered() : bool
- isFree() : bool
- moveCursor() : bool
- Adjusts the result pointer to an arbitrary row in the result.
- numRows() : int|string
- Gets the number of rows in the result set.
- setFetchClass() : static
- checkIsFree() : void
Properties
$buffered
protected
bool
$buffered
$fetchClass
protected
string
$fetchClass
= \stdClass::class
$fetchConstructor
protected
array<string|int, mixed>
$fetchConstructor
= []
$free
protected
bool
$free
= false
$result
protected
mysqli_result<int, array<string|int, mixed>|false|null>
$result
Methods
__construct()
Result constructor.
public
__construct(mysqli_result<int, array<string|int, mixed>|false|null> $result, bool $buffered) : mixed
Parameters
- $result : mysqli_result<int, array<string|int, mixed>|false|null>
- $buffered : bool
__destruct()
public
__destruct() : mixed
fetch()
Fetches the current row as object and move the cursor to the next.
public
fetch([string|null $class = null ], mixed ...$constructor) : object|null
Parameters
- $class : string|null = null
- $constructor : mixed
Return values
object|nullfetchAll()
Fetches all rows as objects.
public
fetchAll([string|null $class = null ], mixed ...$constructor) : array<int, object>
Parameters
- $class : string|null = null
- $constructor : mixed
Return values
array<int, object>fetchArray()
Fetches the current row as array and move the cursor to the next.
public
fetchArray() : array<string, float|int|string|null>|null
Return values
array<string, float|int|string|null>|nullfetchArrayAll()
Fetches all rows as arrays.
public
fetchArrayAll() : array<int, array<string|int, mixed>>
Return values
array<int, array<string|int, mixed>>fetchArrayRow()
Fetches a specific row as array and move the cursor to the next.
public
fetchArrayRow(int $offset) : array<string, float|int|string|null>
Parameters
- $offset : int
Return values
array<string, float|int|string|null>fetchFields()
Returns an array of objects representing the fields in a result set.
public
fetchFields() : array<int, Field>
Return values
array<int, Field> —an array of objects which contains field definition information
fetchRow()
Fetches a specific row as object and move the cursor to the next.
public
fetchRow(int $offset[, string|null $class = null ], mixed ...$constructor) : object
Parameters
- $offset : int
- $class : string|null = null
- $constructor : mixed
Return values
objectfree()
Frees the memory associated with a result.
public
free() : void
isBuffered()
public
isBuffered() : bool
Return values
boolisFree()
public
isFree() : bool
Return values
boolmoveCursor()
Adjusts the result pointer to an arbitrary row in the result.
public
moveCursor(int $offset) : bool
Parameters
- $offset : int
-
The field offset. Must be between zero and the total number of rows minus one
Tags
Return values
boolnumRows()
Gets the number of rows in the result set.
public
numRows() : int|string
Return values
int|stringsetFetchClass()
public
setFetchClass(string $class, mixed ...$constructor) : static
Parameters
- $class : string
- $constructor : mixed
Return values
staticcheckIsFree()
protected
checkIsFree() : void