PHP Class Pheasant\Database\Mysqli\ResultSet

Inheritance: implements IteratorAggregate, implements ArrayAccess, implements Countable
Show file Open project: lox/pheasant

Public Methods

Method Description
__construct ( $link, $result = false ) Constructor
affectedRows ( ) : integer The number of rows that the statement affected
column ( $column = null ) : Iterator Fetches an iterator that only returns a particular column, defaults to the first
count ( ) The number of rows in the result set, or the number of affected rows
fields ( ) : Fields The fields returned in the result set as an array of fields
getIterator ( ) * (non-phpdoc)
lastInsertId ( ) The last auto_increment value generated in the statement
offsetExists ( $offset )
offsetGet ( $offset ) array access
offsetSet ( $offset, $value )
offsetUnset ( $offset )
row ( ) : array Returns the next available row as an associative array.
scalar ( $idx ) : scalar Returns the nth column from the current row.
seek ( $offset ) Seeks to a particular row offset
setHydrator ( $callback )
toArray ( ) : array

Method Details

__construct() public method

Constructor
public __construct ( $link, $result = false )
$link MySQLi
$result MySQLi_Result

affectedRows() public method

The number of rows that the statement affected
public affectedRows ( ) : integer
return integer

column() public method

Fetches an iterator that only returns a particular column, defaults to the first
public column ( $column = null ) : Iterator
return Iterator

count() public method

The number of rows in the result set, or the number of affected rows
public count ( )

fields() public method

The fields returned in the result set as an array of fields
public fields ( ) : Fields
return Fields object

getIterator() public method

* (non-phpdoc)
See also: IteratorAggregate::getIterator()
public getIterator ( )

lastInsertId() public method

The last auto_increment value generated in the statement
public lastInsertId ( )

offsetExists() public method

public offsetExists ( $offset )

offsetGet() public method

array access
public offsetGet ( $offset )

offsetSet() public method

public offsetSet ( $offset, $value )

offsetUnset() public method

public offsetUnset ( $offset )

row() public method

Returns the next available row as an associative array.
public row ( ) : array
return array or NULL on EOF

scalar() public method

Returns the nth column from the current row.
public scalar ( $idx ) : scalar
return scalar or NULL on EOF

seek() public method

Seeks to a particular row offset
public seek ( $offset )

setHydrator() public method

public setHydrator ( $callback )

toArray() public method

public toArray ( ) : array
return array