Menu

## Result
in package

Result.php : 33

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() : mixed
  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() : mixed
  After an INSERT query, get the ID that was inserted.

### Methods

#### count()

Result.php : 42

Count the number of rows in the result set.

`public abstract count() : mixed`

@return int

##### Return values

mixed —

#### fetch()

Result.php : 50

Get the next row in a result set

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

@param int PDO row fetch style - PDO::FETCH_ASSOC is the default

##### Parameters

$fetchType : mixed = PDO::FETCH_ASSOC

##### Return values

array<string|int, mixed> —

#### fetchAll()

Result.php : 58

Get all rows in the result set

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

@param int PDO row fetch style - PDO::FETCH_ASSOC is the default

##### Parameters

$fetchType : mixed = PDO::FETCH_ASSOC

##### Return values

array<string|int, mixed> —

#### insertId()

Result.php : 65

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

`public abstract insertId() : mixed`

@return int

##### Return values

mixed —

## Search results