public function next()
    {
        if ($this->limit && $this->currentPos >= $this->limit) { // it won't go further than the selected limit
            return null;
        }
        $oldLimit = $this->limit;
        $oldOffset = $this->offset;
        $this->limit = 1;
        $this->offset += $this->currentPos;
        $rows = $this->get();
        $this->limit = $oldLimit;
        $this->offset = $oldOffset;
        $this->currentPos++;
        return isset($rows[0]) ? $rows[0] : null;
    }
public function next()
    {
        if ($this->limit && $this->currentPos >= $this->limit) { // it won't go further than the selected limit
            return null;
        }
        $oldLimit = $this->limit;
        $oldOffset = $this->offset;
        $this->limit = 1;
        $this->offset += $this->currentPos;
        $rows = $this->get();
        $this->limit = $oldLimit;
        $this->offset = $oldOffset;
        $this->currentPos++;
        return isset($rows[0]) ? $rows[0] : null;
    }
public function next ( ) { if ( $ this -> limit && $ this -> currentPos >= $ this -> limit ) { // it won't go further than the selected limit return null ; } $ oldLimit = $ this -> limit ; $ oldOffset = $ this -> offset ; $ this -> limit = 1 ; $ this -> offset += $ this -> currentPos ; $ rows = $ this -> get ( ) ; $ this -> limit = $ oldLimit ; $ this -> offset = $ oldOffset ; $ this -> currentPos ++ ; return isset ( $ rows [ 0 ] ) ? $ rows [ 0 ] : null ; }
Return results one by one. If a limit is set it won't go further than the selected limit.
Also it will start from the selected offset if one is set.
@return null|string[string]
Return results one by one . If a limit is set it won t go further than the selected limit . Also it will start from the selected offset if one is set .