function &_FetchField($fieldOffset = -1)
 {
     $fld = new ADOFieldObject();
     $fieldOffset += 1;
     $fld->name = strtolower(OCIcolumnname($this->_queryID, $fieldOffset));
     $fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
     $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
     if ($fld->type == 'NUMBER') {
         //$p = OCIColumnPrecision($this->_queryID, $fieldOffset);
         $sc = OCIColumnScale($this->_queryID, $fieldOffset);
         if ($sc == 0) {
             $fld->type = 'INT';
         }
     }
     return $fld;
 }
	function _FetchField($fieldOffset = -1)
	{
		$fld = new ADOFieldObject;
		$fieldOffset += 1;
		$fld->name =OCIcolumnname($this->_queryID, $fieldOffset);
		$fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
		$fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
	 	switch($fld->type) {
		case 'NUMBER':
	 		$p = OCIColumnPrecision($this->_queryID, $fieldOffset);
			$sc = OCIColumnScale($this->_queryID, $fieldOffset);
			if ($p != 0 && $sc == 0) $fld->type = 'INT';
			break;

	 	case 'CLOB':
		case 'NCLOB':
		case 'BLOB':
			$fld->max_length = -1;
			break;
		}
		return $fld;
	}
Example #3
0
 function &_FetchField($fieldOffset = -1)
 {
     $fld = new ADOFieldObject();
     $fieldOffset += 1;
     $fld->name = OCIcolumnname($this->_queryID, $fieldOffset);
     $fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
     $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
     if ($fld->type == 'NUMBER') {
         $p = OCIColumnPrecision($this->_queryID, $fieldOffset);
         $sc = OCIColumnScale($this->_queryID, $fieldOffset);
         if ($p != 0 && $sc == 0) {
             $fld->type = 'INT';
         }
         //echo " $this->name ($p.$sc) ";
     }
     return $fld;
 }
 function _FetchField($fieldOffset = -1)
 {
     $fld = new ADOFieldObject();
     $fieldOffset += 1;
     $fld->name = OCIcolumnname($this->_queryID, $fieldOffset);
     if (ADODB_ASSOC_CASE == ADODB_ASSOC_CASE_LOWER) {
         $fld->name = strtolower($fld->name);
     }
     $fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
     $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
     if ($fld->type == 'NUMBER') {
         $sc = OCIColumnScale($this->_queryID, $fieldOffset);
         if ($sc == 0) {
             $fld->type = 'INT';
         }
     }
     return $fld;
 }