v5:reference:recordset:movenext
This is an old revision of the document!
moveNext
Syntax
bool moveNext()
Description
The function moveNext()
moves the cursor to the next record in a recordset from the current position.If the cursor is successfully moved then the function returns true. If the move is passed EOF the function returns false.
Usage
/* * Connection to DB2 sample database */ $SQL = "SELECT * FROM act" $recordset = $db->execute($SQL); /* * Go to the 10th record */ $recordset->move(9); /* * Retrieve the record as an object */ $record = $recordset->fetchObj; print_r($record); /* * Prints ADOFetchObj Object ( [ACTNO] => 100 [ACTKWD] => TEACH [ACTDESC] => TEACH CLASSES ) */ /* * Go to the 11th record */ $recordSet->moveNext(); /* * Retrieve the record as an object */ $record = $recordset->fetchObj; print_r($record); /* * Prints ADOFetchObj Object ( [ACTNO] => 110 [ACTKWD] => COURSE [ACTDESC] => DEVELOP COURSES ) */
v5/reference/recordset/movenext.1577963026.txt.gz · Last modified: 2020/01/02 12:03 by dregad