예제 #1
0
 /**
  * db2_field_type() wrapper
  * @param $res Object: result of executed statement
  * @param $index Mixed: number or name of the column
  * @return String column type
  */
 public function fieldType($res, $index)
 {
     if ($res instanceof ResultWrapper) {
         $res = $res->result;
     }
     if ($res instanceof IBM_DB2Result) {
         $res = $res->getResult();
     }
     return db2_field_type($res, $index);
 }
예제 #2
0
 function &FetchField($offset = -1)
 {
     $o = new ADOFieldObject();
     $o->name = @db2_field_name($this->_queryID, $offset);
     $o->type = @db2_field_type($this->_queryID, $offset);
     $o->max_length = db2_field_width($this->_queryID, $offset);
     if (ADODB_ASSOC_CASE == 0) {
         $o->name = strtolower($o->name);
     } else {
         if (ADODB_ASSOC_CASE == 1) {
             $o->name = strtoupper($o->name);
         }
     }
     return $o;
 }
예제 #3
0
 public static function getColumnMeta($index, $sql)
 {
     if ($sql && $index >= 0) {
         $newmeta = array();
         $newmeta["name"] = db2_field_name($sql, $index);
         $newmeta["native_type"] = db2_field_type($sql, $index);
         $newmeta["len"] = db2_field_width($sql, $index);
         return $newmeta;
     }
     return false;
 }