Result

Result

Methods

rowCount

Returns the number of rows affected by the last SQL statement.

Result::rowCount( ): integer

PDOStatement method.

Return Value: integer


isEmpty

Does the result contain no database rows?

Result::isEmpty( ): boolean

Return Value: boolean


isNotEmpty

Does the result contain any database rows?

Result::isNotEmpty( ): boolean

Return Value: boolean


fetch

Fetches the next row from a result set.

Result::fetch( integer|null $fetch_style = null, integer|null $cursor_orientation = null, integer|null $cursor_offset = null ): mixed

PDOStatement method.

Return Value: mixed


fetchAll

Returns an array containing all of the result set rows.

Result::fetchAll( integer|null $fetch_style = null, integer|string|null $fetch_argument = null, array|null $ctor_args = null ): array

PDOStatement method.

Return Value: array


fetchColumn

Returns a single column from the next row of a result set.

Result::fetchColumn( integer $column_number ): string

PDOStatement method.

Return Value: string


fetchGrouped

Fetches all as an array, grouped by key using the first column in the result set.

Result::fetchGrouped( ): array

Return Value: array


fetchGroupedUnique

Fetches all as an array, grouped by key where the contents

Result::fetchGroupedUnique( ): array

Return Value: array


fetchKeyPair

Fetches all as an associative array of key => value pairs. The query may only have two columns.

Result::fetchKeyPair( ): array

Return Value: array


setFetchMode

Returns the number of rows affected by the last SQL statement.

Result::setFetchMode( integer $mode, mixed|null $params = null ): boolean

PDOStatement method.

Return Value: boolean


toDataSet

Fetches all results and returns it as a DataSet object.

Result::toDataSet( ): array

Return Value: array