src/db/sqlite/SQLiteResult.php
public function fetchRow($mode = ARRAY_BOTH) {
        if (!$this->result || $this->nextRowIndex < 0)        // no automatic result reset()
            return null;

        switch ($mode) {
            case ARRAY_ASSOC: $mode = SQLITE3_ASSOC; break;
            case ARRAY_NUM:   $mode = SQLITE3_NUM;   break;
            default:          $mode = SQLITE3_BOTH;
        }

        $row = $this->result->fetchArray($mode);
        if ($row) {
            $this->nextRowIndex++;
        }
        else {
            if ($this->numRows === null)                       // update $numRows on-the-fly if not yet happened
                $this->numRows = $this->nextRowIndex;
            $row                = null;                        // prevent fetchArray() to trigger an automatic reset()
            $this->nextRowIndex = -1;                          // on second $row == null
        }
        return $row;
    }
public function fetchRow($mode = ARRAY_BOTH) {
        if (!$this->result || $this->nextRowIndex < 0)        // no automatic result reset()
            return null;

        switch ($mode) {
            case ARRAY_ASSOC: $mode = SQLITE3_ASSOC; break;
            case ARRAY_NUM:   $mode = SQLITE3_NUM;   break;
            default:          $mode = SQLITE3_BOTH;
        }

        $row = $this->result->fetchArray($mode);
        if ($row) {
            $this->nextRowIndex++;
        }
        else {
            if ($this->numRows === null)                       // update $numRows on-the-fly if not yet happened
                $this->numRows = $this->nextRowIndex;
            $row                = null;                        // prevent fetchArray() to trigger an automatic reset()
            $this->nextRowIndex = -1;                          // on second $row == null
        }
        return $row;
    }
public function fetchRow ( $ mode = ARRAY_BOTH ) { if ( ! $ this -> result || $ this -> nextRowIndex < 0 ) // no automatic result reset() return null ; switch ( $ mode ) { case ARRAY_ASSOC : $ mode = SQLITE3_ASSOC ; break ; case ARRAY_NUM : $ mode = SQLITE3_NUM ; break ; default : $ mode = SQLITE3_BOTH ; } $ row = $ this -> result -> fetchArray ( $ mode ) ; if ( $ row ) { $ this -> nextRowIndex ++ ; } else { if ( $ this -> numRows === null ) // update $numRows on-the-fly if not yet happened $ this -> numRows = $ this -> nextRowIndex ; $ row = null ; // prevent fetchArray() to trigger an automatic reset() $ this -> nextRowIndex = - 1 ; // on second $row == null } return $ row ; }
Fetch the next row from the result set.

The types of the values of the returned array are mapped from SQLite3 types as follows:                  <br>
- Integers are mapped to int if they fit into the range PHP_INT_MIN...PHP_INT_MAX, otherwise to string. <br>
- Floats are mapped to float.                                                                           <br>
- NULL values are mapped to NULL.                                                                       <br>
- Strings and blobs are mapped to string.                                                               <br>

{@inheritdoc}
Fetch the next row from the result set .