irm-1.6-b3/MDB/Common.php
/**
     * Fetch and return a column of data (it uses fetchInto for that)
     *
     * @param resource $result result identifier
     * @param int $colnum the row number to fetch
     * @return mixed data array on success, a MDB error on failure
     * @access public
     */
Fetch and return a column of data (it uses fetchInto for that)
@param resource $result result identifier
@param int $colnum the row number to fetch
@return mixed data array on success, a MDB error on failure
@access public
Fetch and return a column of data ( it uses fetchInto for that ) @param resource $result result identifier @param int $colnum the row number to fetch @return mixed data array on success a MDB error on failure @access public
function fetchCol($result, $colnum = 0)
    {
        $fetchmode = is_numeric($colnum) ? MDB_FETCHMODE_ORDERED : MDB_FETCHMODE_ASSOC;
        $column = array();
        $row = $this->fetchInto($result, $fetchmode);
        if (is_array($row)) {
            if (!array_key_exists($colnum, $row)) {
                return($this->raiseError(MDB_ERROR_TRUNCATED));
            }
            do {
                $column[] = $row[$colnum];
            } while (is_array($row = $this->fetchInto($result, $fetchmode)));
        }
        if (!$this->options['autofree']) {
            $this->freeResult($result);
        }
        if (MDB::isError($row)) {
            return($row);
        }
        return($column);
    }
function fetchCol ( $ result , $ colnum = 0 ) { $ fetchmode = is_numeric ( $ colnum ) ? MDB_FETCHMODE_ORDERED : MDB_FETCHMODE_ASSOC ; $ column = array ( ) ; $ row = $ this -> fetchInto ( $ result , $ fetchmode ) ; if ( is_array ( $ row ) ) { if ( ! array_key_exists ( $ colnum , $ row ) ) { return ( $ this -> raiseError ( MDB_ERROR_TRUNCATED ) ) ; } do { $ column [ ] = $ row [ $ colnum ] ; } while ( is_array ( $ row = $ this -> fetchInto ( $ result , $ fetchmode ) ) ) ; } if ( ! $ this -> options [ 'autofree' ] ) { $ this -> freeResult ( $ result ) ; } if ( MDB :: isError ( $ row ) ) { return ( $ row ) ; } return ( $ column ) ; }
Fetch and return a column of data (it uses fetchInto for that)
 @param resource $result result identifier
 @param int $colnum the row number to fetch
 @return mixed data array on success, a MDB error on failure
 @access public
Fetch and return a column of data ( it uses fetchInto for that ) @param resource $result result identifier @param int $colnum the row number to fetch @return mixed data array on success a MDB error on failure @access public