function num_fields() { return OCINumcols($this->Parse); }
function num_fields() { return OCINumcols($this->Query_ID); }
function oracleMetadata(&$db) { $id = $db->Query_ID; $META = new stdClass(); #echo "SQL=".$db->LastSQL."<br>"; #echo "Columnas =".OCINumcols($id)."<br>"; $META->cols = array(); for ($ix = 1; $ix <= OCINumcols($id); $ix++) { $col = oci_field_name($id, $ix); $type = oci_field_type_raw($id, $ix); $presicion = oci_field_precision($id, $ix); $escala = oci_field_scale($id, $ix); $standarType = MetaStandardType("Oracle", $type, $escala); $META->colsbyname["{$col}"] = new stdClass(); $META->colsbyname["{$col}"]->{"type"} = $standarType; $META->colsbyname["{$col}"]->{"precision"} = $presicion; $META->colsbyname["{$col}"]->{"scale"} = $escala; $META->colsbyname["{$col}"]->{"size"} = oci_field_size($id, $ix); $META->colsbyname["{$col}"]->{"is_null"} = oci_field_is_null($id, $ix); $META->colsbyname["{$col}"]->{"type_raw"} = $type; $META->cols[$ix - 1] = new stdClass(); $META->cols[$ix - 1]->{"type"} = $standarType; $META->cols[$ix - 1]->{"precision"} = $presicion; $META->cols[$ix - 1]->{"scale"} = $escala; $META->cols[$ix - 1]->{"size"} = oci_field_size($id, $ix); $META->cols[$ix - 1]->{"is_null"} = oci_field_is_null($id, $ix); $META->cols[$ix - 1]->{"type_raw"} = $type; //if($db->Debug) #echo"<b>[$col]</b>:" #.$META->colsbyname["$col"]->type #.' '.$META->colsbyname["$col"]->size #.' Presicion='.$META->colsbyname["$col"]->precision #.' Ecala='.$META->colsbyname["$col"]->scale #.' '.$META->colsbyname["$col"]->is_null #.' type='.$META->colsbyname["$col"]->type_raw #.' '."<br>\n"; } return $META; }