irm-1.6-b3/MDB/mysql.php
/**
     * Fetch a row and insert the data into an existing array.
     *
     * @param resource  $result     result identifier
     * @param int       $fetchmode  how the array data should be indexed
     * @param int       $rownum     the row number to fetch
     * @return int data array on success, a MDB error on failure
     * @access public
     */
Fetch a row and insert the data into an existing array.
Fetch a row and insert the data into an existing array .
function fetchInto($result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = NULL)
    {
        $result_value = intval($result);
        if ($rownum == NULL) {
            ++$this->highest_fetched_row[$result_value];
        } else {
            if (!@mysql_data_seek($result, $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 ($fetchmode & MDB_FETCHMODE_ASSOC) {
            $row = @mysql_fetch_assoc($result);
            if (is_array($row) && $this->options['optimize'] == 'portability') {
                $row = array_change_key_case($row, CASE_LOWER);
            }
        } else {
            $row = @mysql_fetch_row($result);
        }
        if (!$row) {
            if($this->options['autofree']) {
                $this->freeResult($result);
            }
            return(NULL);
        }
        if (isset($this->result_types[$result_value])) {
            $row = $this->convertResultRow($result, $row);
        }
        return($row);
    }
function fetchInto ( $ result , $ fetchmode = MDB_FETCHMODE_DEFAULT , $ rownum = NULL ) { $ result_value = intval ( $ result ) ; if ( $ rownum == NULL ) { ++ $ this -> highest_fetched_row [ $ result_value ] ; } else { if ( ! @ mysql_data_seek ( $ result , $ 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 ( $ fetchmode & MDB_FETCHMODE_ASSOC ) { $ row = @ mysql_fetch_assoc ( $ result ) ; if ( is_array ( $ row ) && $ this -> options [ 'optimize' ] == 'portability' ) { $ row = array_change_key_case ( $ row , CASE_LOWER ) ; } } else { $ row = @ mysql_fetch_row ( $ result ) ; } if ( ! $ row ) { if ( $ this -> options [ 'autofree' ] ) { $ this -> freeResult ( $ result ) ; } return ( NULL ) ; } if ( isset ( $ this -> result_types [ $ result_value ] ) ) { $ row = $ this -> convertResultRow ( $ result , $ row ) ; } return ( $ row ) ; }
Fetch a row and insert the data into an existing array.
Fetch a row and insert the data into an existing array .