bool moveFirst()
The function moveFirst()
moves the cursor to the first record in a recordset. The only time that the function returns false is if the recordset is empty.
/* * Connection to DB2 sample database */ $sql = "SELECT * FROM act ORDER BY ACTNO ASC"; $recordset = $db->execute($sql); /* * Go to the 10th record */ $recordset->move(9); $record = $recordset->fetchObj(); print_r($record); $recordset->moveFirst(); $record = $recordset->fetchObj(); print_r($record);