public function queryPage(int $requestedPage): bool
    {
        // clear
        $this->page = 0;
        $this->totalRecords = null;
        $this->recordset = null;
        // request
        $page = min($this->getTotalPages(), max(1, $requestedPage));
        $query = $this->dbal->sqlLimit($this->getQueryData(), $page, $this->getPageSize());
        $recordset = $this->dbal->queryRecordset($query);
        if (false === $recordset) {
            return false;
        }
        $this->page = $page;
        $this->recordset = $recordset;
        return true;
    }
public function queryPage(int $requestedPage): bool
    {
        // clear
        $this->page = 0;
        $this->totalRecords = null;
        $this->recordset = null;
        // request
        $page = min($this->getTotalPages(), max(1, $requestedPage));
        $query = $this->dbal->sqlLimit($this->getQueryData(), $page, $this->getPageSize());
        $recordset = $this->dbal->queryRecordset($query);
        if (false === $recordset) {
            return false;
        }
        $this->page = $page;
        $this->recordset = $recordset;
        return true;
    }
public function queryPage ( int $ requestedPage ) : bool { // clear $ this -> page = 0 ; $ this -> totalRecords = null ; $ this -> recordset = null ; // request $ page = min ( $ this -> getTotalPages ( ) , max ( 1 , $ requestedPage ) ) ; $ query = $ this -> dbal -> sqlLimit ( $ this -> getQueryData ( ) , $ page , $ this -> getPageSize ( ) ) ; $ recordset = $ this -> dbal -> queryRecordset ( $ query ) ; if ( false === $ recordset ) { return false ; } $ this -> page = $ page ; $ this -> recordset = $ recordset ; return true ; }
perform the query to get a limited result
@param int $requestedPage
@return bool
perform the query to get a limited result