Thanks to PHP5 SPL this allows you to foreach() over a DataSet: $ds = new QueryDataSet($conn, "select * from author"); $ds->fetchRecords(); foreach($ds as $rec) { print $rec->getValue("mycol"); }
See also | DataSet::getIterator() |
Iterator::__construct ( SQLiteResultSet $rs ) |
Construct the iterator.
|
Iterator::rewind ( ) |
This method actually has no effect, since we do not rewind ResultSet for iteration. |
Iterator::valid ( ) |
|
int Iterator::key ( ) |
Returns the cursor position. Note that this will not necessarily be 1 for the first row, since no rewind is performed at beginning of iteration.
|
array Iterator::current ( ) |
Returns the row (assoc array) at current cursor pos.
|
Iterator::next ( ) |
Advances internal cursor pos. |
Iterator::__construct ( ResultSet $rs ) |
Construct the iterator.
|
Iterator::rewind ( ) |
If not at start of resultset, this method will call seek(0).
|
Iterator::valid ( ) |
This method checks to see whether there are more results by advancing the cursor position.
|
int Iterator::key ( ) |
Returns the cursor position.
|
array Iterator::current ( ) |
Returns the row (assoc array) at current cursor pos.
|
Iterator::next ( ) |
This method does not actually do anything since we have already advanced the cursor pos in valid().
|
Iterator::__construct ( DataSet $ds ) |
|
Iterator::rewind ( ) |
|
Iterator::valid ( ) |
|
Iterator::key ( ) |
|
Iterator::current ( ) |
|
Iterator::next ( ) |
|
This file is part of the Creole[php5] library.
Copyright © 2004 Hans Lellelid |   |
Creole[php5] CVS
|