IDbResult

Interface for database query results.
Source
IDbResult.php
Extends
Iterator
Implementations
MySqliResult , PostgreSqlResult

Methods

__construct

IDbResult $obj = new IDbResult(resource res)

Create an IDbResult instance.

Arguments

    res (resource)
    Database query result.

Returns

void

count

int $obj->count()

Get row count.

Returns

int
Row count

fieldCount

int $obj->fieldCount()

Query field count.

Returns

int
Field count

fields

array|string $obj->fields(string glue=null, string esc="`")

Get query columns.

Arguments

    glue=null (string)
    null=return an array of column names, string=return a string of column names glued with the string
    esc="`" (string)
    Column name escape character

Returns

array|string
A list of column names or a string of glued column names

free

void $obj->free()

Free query result resource.

Returns

void

next

object|array $obj->next()

Fetch row as object (default) or array.

Returns

object|array
The fetched row

row

array $obj->row()

Fetch row as array.

Returns

array
The fetched row.

seek

void $obj->seek(int row=0)

Move to a row.

Arguments

    row=0 (int)
    Zero based row index

Returns

void