public function seek($position)
    {
        if ($position < 0) {
            throw new \OutOfBoundsException("Unable to seek to negative offset $position");
        }

        if ($this->_position !== $position) {
            if(($count = $this->_result->num_rows) && ($position > ($count-1)))
                throw new \OutOfBoundsException("Unable to seek to offset $position");

            if ($count) {
                $this->_result->data_seek($this->_position = $position);
                $this->_currentRow = $this->_fetch();
            }

            $this->_position = $position;
        }
    }
public function seek($position)
    {
        if ($position < 0) {
            throw new \OutOfBoundsException("Unable to seek to negative offset $position");
        }

        if ($this->_position !== $position) {
            if(($count = $this->_result->num_rows) && ($position > ($count-1)))
                throw new \OutOfBoundsException("Unable to seek to offset $position");

            if ($count) {
                $this->_result->data_seek($this->_position = $position);
                $this->_currentRow = $this->_fetch();
            }

            $this->_position = $position;
        }
    }
public function seek ( $ position ) { if ( $ position < 0 ) { throw new \ OutOfBoundsException ( "Unable to seek to negative offset $position" ) ; } if ( $ this -> _position !== $ position ) { if ( ( $ count = $ this -> _result -> num_rows ) && ( $ position > ( $ count - 1 ) ) ) throw new \ OutOfBoundsException ( "Unable to seek to offset $position" ) ; if ( $ count ) { $ this -> _result -> data_seek ( $ this -> _position = $ position ) ; $ this -> _currentRow = $ this -> _fetch ( ) ; } $ this -> _position = $ position ; } }
Seeks to a particular position in the result, offset is from 0.
Seeks to a particular position in the result offset is from 0 .