ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:recordset:movelast

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:movelast [2020/01/02 12:03] – ↷ Page moved from v5:reference:connection:movelast to v5:reference:recordset:movelast dregadv5:reference:recordset:movelast [2020/01/02 16:53] (current) – fix typos in the example peterdd
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);
  
-/* +$recordset->moveLast()
- * Go to the 10th record +$record = $recordset->fetchObj(); 
- */ +print_r($record);
-$recordset->moveLast; +
-/* +
- * Retrieve the record as an object +
- */ +
-$record = $recordset->fetchObj;+
  
-print_r($record); 
 /* /*
  * Prints  * Prints
Line 35: Line 29:
 ) )
  
-$ok = $recordSet->moveNext()+$ok = $recordset->moveNext();
 /* /*
  * Past EOF, $ok returns false  * Past EOF, $ok returns false
v5/reference/recordset/movelast.1577963026.txt.gz · Last modified: 2020/01/02 12:03 by dregad