Documentation

Result
in package

Table of Contents

Properties

$pdoStatement  : PDOStatement|null

Methods

fetch()  : mixed
Fetches the next row from a result set and returns it according to the $fetch_parameters format
fetchAll()  : mixed
Fetches all rows from the result set.
reset()  : void
Resets the result object to its initial state.
set()  : void
Sets the PDOStatement result set.

Properties

$pdoStatement

private PDOStatement|null $pdoStatement = null

Methods

fetch()

Fetches the next row from a result set and returns it according to the $fetch_parameters format

public fetch([int $fetch_parameters = PDO::FETCH_OBJ ]) : mixed
Parameters
$fetch_parameters : int = PDO::FETCH_OBJ

The PDO fetch style record options

Return values
mixed

The next row of the result set or false if we reached the end

fetchAll()

Fetches all rows from the result set.

public fetchAll([int $fetch_parameters = PDO::FETCH_OBJ ]) : mixed
Parameters
$fetch_parameters : int = PDO::FETCH_OBJ

The fetch style to use. Defaults to \PDO::FETCH_OBJ.

Return values
mixed

An array containing all rows from the result set, or false on failure.

reset()

Resets the result object to its initial state.

public reset() : void

This method clears any stored result data and resets the internal pointer to the first row. After calling this method, the result object can be reused to execute another query.

set()

Sets the PDOStatement result set.

public set(PDOStatement $pdoStatement) : void
Parameters
$pdoStatement : PDOStatement

The PDOStatement result set.


        
On this page

Search results