Example #1
0
 function db_columnType($oStmt, $iPos)
 {
     $types = @ifx_fieldtypes($oStmt);
     $keys = array_keys($types);
     $key = $keys[$iPos - 1];
     return $types[$key];
 }
Example #2
0
 function GetColumnNames($result)
 {
     $result_value = intval($result);
     if (!isset($this->highest_fetched_row[$result_value])) {
         return $this->SetError("Get column names", "it was specified an inexisting result set");
     }
     if (!isset($this->columns[$result_value])) {
         $this->columns[$result_value] = $this->column_names[$result_value] = array();
         $columns = ifx_num_fields($result);
         $types = ifx_fieldtypes($result);
         for (Reset($types), $column = 0; $column < $columns; $column++, Next($types)) {
             $field_name = Key($types);
             $this->column_names[$result_value][$column] = $field_name;
             $this->columns[$result_value][$field_name] = $column;
         }
     }
     return 1;
 }
Example #3
0
 function &FetchField($fieldOffset = -1)
 {
     #$fieldOffset = -1;
     if ($fieldOffset != -1) {
         $o = @ifx_fieldtypes($this->_queryID, $fieldOffset);
     } else {
         if ($fieldOffset == -1) {
             /*	The $fieldOffset argument is not provided thus its -1 	*/
             $o = @ifx_fieldtypes($this->_queryID);
         }
     }
     // older versions of PHP did not support type, only numeric
     if ($o && !isset($o->type)) {
         $o->type = $o->numeric ? 'float' : 'varchar';
     }
     return $o;
 }