Menu

## Result
in package

Result.php : 32

Result object given by a {@see Query} performed on a database.

The typical pattern for using this class is to receive an instance of it as a result of using the Database and Query class methods that return a result. This class should not be initialised independently.

Note that this is a stub class that a driver will extend and complete as required for individual database types. Individual drivers could add additional methods, but this is discouraged to ensure that the API is the same for all database types.

### Table of Contents

count() : int
  Count the number of rows in the result set.
fetch() : array<string|int, mixed>
  Get the next row in a result set.
fetchAll() : array<string|int, mixed>
  Get all rows in the result set.
insertId() : int
  After an INSERT query, get the ID that was inserted.

### Methods

#### count()

Result.php : 43

Count the number of rows in the result set.

`public abstract count() : int`

##### Return values

int —

#### fetch()

Result.php : 52

Get the next row in a result set.

`public abstract fetch([int $fetchType = PDO::FETCH_ASSOC ]) : array<string|int, mixed>`

##### Parameters

$fetchType : int = PDO::FETCH_ASSOC

  PDO row fetch style - PDO::FETCH_ASSOC is the default

##### Return values

array<string|int, mixed> —

#### fetchAll()

Result.php : 61

Get all rows in the result set.

`public abstract fetchAll([int $fetchType = PDO::FETCH_ASSOC ]) : array<string|int, mixed>`

##### Parameters

$fetchType : int = PDO::FETCH_ASSOC

  PDO row fetch style - PDO::FETCH_ASSOC is the default

##### Return values

array<string|int, mixed> —

#### insertId()

Result.php : 68

After an INSERT query, get the ID that was inserted.

`public abstract insertId() : int`

##### Return values

int —

## Search results