protected function _renderLimitoffset($sql)
    {
        $count = 0;
        $offset = 0;

        if (!empty($this->_parts[self::LIMIT_OFFSET])) {
            $offset = (int) $this->_parts[self::LIMIT_OFFSET];
            $count = PHP_INT_MAX;
        }

        if (!empty($this->_parts[self::LIMIT_COUNT])) {
            $count = (int) $this->_parts[self::LIMIT_COUNT];
        }

        /*
         * Add limits clause
         */
        if ($count > 0) {
            $sql = trim($this->_adapter->limit($sql, $count, $offset));
        }

        return $sql;
    }
protected function _renderLimitoffset($sql)
    {
        $count = 0;
        $offset = 0;

        if (!empty($this->_parts[self::LIMIT_OFFSET])) {
            $offset = (int) $this->_parts[self::LIMIT_OFFSET];
            $count = PHP_INT_MAX;
        }

        if (!empty($this->_parts[self::LIMIT_COUNT])) {
            $count = (int) $this->_parts[self::LIMIT_COUNT];
        }

        /*
         * Add limits clause
         */
        if ($count > 0) {
            $sql = trim($this->_adapter->limit($sql, $count, $offset));
        }

        return $sql;
    }
protected function _renderLimitoffset ( $ sql ) { $ count = 0 ; $ offset = 0 ; if ( ! empty ( $ this -> _parts [ self :: LIMIT_OFFSET ] ) ) { $ offset = ( int ) $ this -> _parts [ self :: LIMIT_OFFSET ] ; $ count = PHP_INT_MAX ; } if ( ! empty ( $ this -> _parts [ self :: LIMIT_COUNT ] ) ) { $ count = ( int ) $ this -> _parts [ self :: LIMIT_COUNT ] ; } /*
         * Add limits clause
         */ if ( $ count > 0 ) { $ sql = trim ( $ this -> _adapter -> limit ( $ sql , $ count , $ offset ) ) ; } return $ sql ; }
Render LIMIT OFFSET clause

@param string   $sql SQL query
@return string
Render LIMIT OFFSET clause