Result
in package
Class Result.
Table of Contents
- $buffered : bool
- $fetchClass : string
- $fetchConstructor : array<string|int, mixed>
- $free : bool
- $result : mysqli_result
- __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
$result
Methods
__construct()
Result constructor.
public
__construct(mysqli_result<int, array|false|null> $result, bool $buffered) : mixed
Parameters
- $result : mysqli_result<int, array|false|null>
- $buffered : bool
Return values
mixed —__destruct()
public
__destruct() : mixed
Return values
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|null —fetchAll()
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>|null —fetchArrayAll()
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
object —free()
Frees the memory associated with a result.
public
free() : void
Return values
void —isBuffered()
public
isBuffered() : bool
Return values
bool —isFree()
public
isFree() : bool
Return values
bool —moveCursor()
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
bool —numRows()
Gets the number of rows in the result set.
public
numRows() : int|string
Return values
int|string —setFetchClass()
public
setFetchClass(string $class, mixed ...$constructor) : static
Parameters
- $class : string
- $constructor : mixed
Return values
static —checkIsFree()
protected
checkIsFree() : void