| ADOdb Library for PHP Manual | ||
|---|---|---|
| Prev | FetchNextObject | Next |
Gets the current row as an object and moves to the next row automatically. Returns false if at end-of-file. If you set $toupper to true, then the object fields are set to upper-case.
$rs
= $db->Execute('select
firstname,lastname from table');
if ($rs) {
while ($o = $rs->FetchNextObject()) {
print "$o->FIRSTNAME, $o->LASTNAME<BR>";
}
}
There is some trade-off in speed in using FetchNextObject(). If performance is important, you should access rows with the fields[] array. FetchObj()
Returns the current record as an object. Fields are not upper-cased, unlike
FetchObject.
| Prev | Home | Next |
| FetchObject | Up | FetchObj |