v5:reference:recordset:movelast
This is an old revision of the document!
moveLast
Syntax
bool moveLast()
Description
The function moveLast()
moves the cursor to the last record in a recordset. The only time that the function returns false is if the recordset is empty.
Usage
/* * Connection to DB2 sample database */ $SQL = "SELECT * FROM act" $recordset = $db->execute($SQL); /* * Go to the 10th record */ $recordset->moveLast; /* * Retrieve the record as an object */ $record = $recordset->fetchObj; print_r($record); /* * Prints ADOFetchObj Object ( [ACTNO] => 180 [ACTKWD] => DOC [ACTDESC] => DOCUMENT ) $ok = $recordSet->moveNext() /* * Past EOF, $ok returns false */
v5/reference/recordset/movelast.1577963026.txt.gz · Last modified: 2020/01/02 12:03 by dregad