ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:recordset:movenext

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
v5:reference:recordset:movenext [2020/01/02 12:03] – ↷ Page moved from v5:reference:connection:movenext to v5:reference:recordset:movenext dregadv5:reference:recordset:movenext [2020/01/02 16:56] (current) – fix typos in the example peterdd
Line 6: Line 6:
 </WRAP> </WRAP>
 ===== Description ===== ===== 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.+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 ===== ===== Usage =====
Line 13: Line 13:
  * Connection to DB2 sample database  * Connection to DB2 sample database
  */  */
-$SQL = "SELECT * FROM act" +$sql = "SELECT * FROM act"; 
-$recordset = $db->execute($SQL);+$recordset = $db->execute($sql);
  
 /* /*
Line 20: Line 20:
  */  */
 $recordset->move(9); $recordset->move(9);
-/* +$record = $recordset->fetchObj();
- * Retrieve the record as an object +
- */ +
-$record = $recordset->fetchObj;+
  
 print_r($record); print_r($record);
Line 35: Line 32:
 ) )
 */ */
 +
 /* /*
  * Go to the 11th record  * Go to the 11th record
  */  */
-$recordSet->moveNext(); +$recordset->moveNext(); 
-/* +$record = $recordset->fetchObj();
- * Retrieve the record as an object +
- */ +
-$record = $recordset->fetchObj;+
  
 print_r($record); print_r($record);
v5/reference/recordset/movenext.1577963026.txt.gz · Last modified: 2020/01/02 12:03 by dregad