Class DibiResultIterator
External result set iterator.
This can be returned by DibiResult::getIterator() method or using foreach
$result = dibi::query('SELECT * FROM table');
foreach ($result as $row) {
print_r($row);
}
unset($result);
-
DibiResultIterator
implements
Iterator,
Countable
Methods summary
public
|
|
public
|
#
rewind( )
Rewinds the iterator to the first element.
Rewinds the iterator to the first element.
Implementation of
|
public
mixed
|
#
key( )
Returns the key of the current element.
Returns the key of the current element.
Returns
mixed
Implementation of
|
public
mixed
|
#
current( )
Returns the current element.
Returns the current element.
Returns
mixed
Implementation of
|
public
|
#
next( )
Moves forward to next element.
Moves forward to next element.
Implementation of
|
public
boolean
|
#
valid( )
Checks if there is a current element after calls to rewind() or next().
Checks if there is a current element after calls to rewind() or next().
Returns
boolean
Implementation of
|
public
integer
|
#
count( )
Required by the Countable interface.
Required by the Countable interface.
Returns
integer
Implementation of
|