Beispiel #1
0
 function FetchField($fieldOffset = -1)
 {
     $off = $fieldOffset + 1;
     // offsets begin at 1
     $o = new ADOFieldObject();
     $arr = @$this->_queryID->getColumnMeta($fieldOffset);
     if (!$arr) {
         $o->name = 'bad getColumnMeta()';
         $o->max_length = -1;
         $o->type = 'VARCHAR';
         $o->precision = 0;
         #		$false = false;
         return $o;
     }
     //adodb_pr($arr);
     $o->name = $arr['name'];
     if (isset($arr['sqlsrv:decl_type']) && $arr['sqlsrv:decl_type'] != "null") {
         /*
          * If the database is SQL server, use the native built-ins
          */
         $o->type = $arr['sqlsrv:decl_type'];
     } elseif (isset($arr['native_type']) && $arr['native_type'] != "null") {
         $o->type = $arr['native_type'];
     } else {
         $o->type = adodb_pdo_type($arr['pdo_type']);
     }
     $o->max_length = $arr['len'];
     $o->precision = $arr['precision'];
     switch (ADODB_ASSOC_CASE) {
         case ADODB_ASSOC_CASE_LOWER:
             $o->name = strtolower($o->name);
             break;
         case ADODB_ASSOC_CASE_UPPER:
             $o->name = strtoupper($o->name);
             break;
     }
     return $o;
 }
 function &FetchField($fieldOffset = -1)
 {
     $off = $fieldOffset + 1;
     // offsets begin at 1
     $o = new ADOFieldObject();
     $arr = @$this->_queryID->getColumnMeta($fieldOffset);
     if (!$arr) {
         $o->name = 'bad getColumnMeta()';
         $o->max_length = -1;
         $o->type = 'VARCHAR';
         $o->precision = 0;
         #		$false = false;
         return $o;
     }
     //adodb_pr($arr);
     $o->name = $arr['name'];
     if (isset($arr['native_type'])) {
         $o->type = $arr['native_type'];
     } else {
         $o->type = adodb_pdo_type($arr['pdo_type']);
     }
     $o->max_length = $arr['len'];
     $o->precision = $arr['precision'];
     if (ADODB_ASSOC_CASE == 0) {
         $o->name = strtolower($o->name);
     } else {
         if (ADODB_ASSOC_CASE == 1) {
             $o->name = strtoupper($o->name);
         }
     }
     return $o;
 }
Beispiel #3
0
	function &FetchField($fieldOffset = -1) 
	{
		$off=$fieldOffset+1; // offsets begin at 1
		
		$o= new ADOFieldObject();
		$arr = $this->_queryID->getColumnMeta($fieldOffset);
		if (!$arr) return false;

		//adodb_pr($arr);
		$o->name = $arr['name'];
		if (isset($arr['native_type'])) $o->type = $arr['native_type'];
		else $o->type = adodb_pdo_type($arr['pdo_type']);
		$o->max_length = $arr['len'];
		$o->precision = $arr['precision'];
		
		if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name);
		else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name);
		return $o;
	}