irm-1.6-b3/MDB/querysim.php
/**
     * Fetch a row and return data in an array.
     *
     * @param resource $result result identifier
     * @param int $fetchmode ignored
     * @param int $rownum the row number to fetch
     * @return mixed data array or NULL on success, a MDB error on failure
     * @access public
     */
Fetch a row and return data in an array.
Fetch a row and return data in an array .
function fetchInto(&$result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = null)
    {
        $result_value = $this->_querySimSignature($result);
        if ($rownum == null) {
            ++$this->highest_fetched_row[$result_value];
            $rownum = $this->highest_fetched_row[$result_value];
        } else {
            if (!isset($result[1][$rownum])) {
                return null;
            }
            $this->highest_fetched_row[$result_value] =
                max($this->highest_fetched_row[$result_value], $rownum);
        }
        if ($fetchmode == MDB_FETCHMODE_DEFAULT) {
            $fetchmode = $this->fetchmode;
        }
        if(!$row = @$result[1][$rownum]) {
            return null;
        }
        if (is_array($row) && $fetchmode & MDB_FETCHMODE_ASSOC) {
            foreach ($row as $key => $value) {
                $arraytemp[$result[0][$key]] = $value;
            }
            $row = $arraytemp;
            if ($this->options['optimize'] == 'portability') {
                $row = array_change_key_case($row, CASE_LOWER);
            }
        }
        return $row;
    }
function fetchInto ( & $ result , $ fetchmode = MDB_FETCHMODE_DEFAULT , $ rownum = null ) { $ result_value = $ this -> _querySimSignature ( $ result ) ; if ( $ rownum == null ) { ++ $ this -> highest_fetched_row [ $ result_value ] ; $ rownum = $ this -> highest_fetched_row [ $ result_value ] ; } else { if ( ! isset ( $ result [ 1 ] [ $ rownum ] ) ) { return null ; } $ this -> highest_fetched_row [ $ result_value ] = max ( $ this -> highest_fetched_row [ $ result_value ] , $ rownum ) ; } if ( $ fetchmode == MDB_FETCHMODE_DEFAULT ) { $ fetchmode = $ this -> fetchmode ; } if ( ! $ row = @ $ result [ 1 ] [ $ rownum ] ) { return null ; } if ( is_array ( $ row ) && $ fetchmode & MDB_FETCHMODE_ASSOC ) { foreach ( $ row as $ key => $ value ) { $ arraytemp [ $ result [ 0 ] [ $ key ] ] = $ value ; } $ row = $ arraytemp ; if ( $ this -> options [ 'optimize' ] == 'portability' ) { $ row = array_change_key_case ( $ row , CASE_LOWER ) ; } } return $ row ; }
Fetch a row and return data in an array.
Fetch a row and return data in an array .
//if specific rownum request // get row // make row associative