PMA\libraries\DisplayResults::_getOffsets PHP Method

_getOffsets() private method

Get offsets for next page and previous page
See also: getTable()
private _getOffsets ( ) : array
return array array with two elements - $pos_next, $pos_prev
    private function _getOffsets()
    {
        if ($_SESSION['tmpval']['max_rows'] == self::ALL_ROWS) {
            $pos_next = 0;
            $pos_prev = 0;
        } else {
            $pos_next = $_SESSION['tmpval']['pos'] + $_SESSION['tmpval']['max_rows'];
            $pos_prev = $_SESSION['tmpval']['pos'] - $_SESSION['tmpval']['max_rows'];
            if ($pos_prev < 0) {
                $pos_prev = 0;
            }
        }
        return array($pos_next, $pos_prev);
    }
DisplayResults