obj pageExecute( string $sql int $rowsPerPage int $pageNumber optional mixed $bindVars=false )
The method pageExecute()
will select the supplied $pageNumber from a recordset, given that it is paginated in pages of $rowsPerPage rows. It also saves two boolean values indicating whether the given page is the first and/or last one of the recordset.
$SQL = "SELECT * FROM Orders"; /* * Gets the second page of records, based on 15 records per page */ $result = $db->pageExecute($SQL,15,2); print_r($result->getAll());
The original author of this method was Iván Oliva .