From: Thies C. Arntzen Date: Thu, 17 Oct 2002 08:09:31 +0000 (+0000) Subject: @- Added Oracle TIMESTAMP type to oci8 extension. (thies) X-Git-Tag: php-4.3.0pre2~317 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58d1ee0915666fa3dc452d51671f6287217d8ae6;p=php @- Added Oracle TIMESTAMP type to oci8 extension. (thies) --- diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 54deffb198..7cf02845e7 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1670,7 +1670,14 @@ oci_execute(oci_statement *statement, char *func,ub4 mode) case SQLT_BIN: default: define_type = SQLT_CHR; - if ((outcol->data_type == SQLT_DAT) || (outcol->data_type == SQLT_NUM)) { + if ((outcol->data_type == SQLT_DAT) || (outcol->data_type == SQLT_NUM) +#ifdef SQLT_TIMESTAMP + || (outcol->data_type == SQLT_TIMESTAMP) +#endif +#ifdef SQLT_TIMESTAMP_TZ + || (outcol->data_type == SQLT_TIMESTAMP_TZ) +#endif + ) { outcol->storage_size4 = 512; /* XXX this should fit "most" NLS date-formats and Numbers */ } else { outcol->storage_size4++; /* add one for string terminator */ @@ -3735,6 +3742,16 @@ PHP_FUNCTION(ocicolumntype) RETURN_FALSE; } switch (outcol->data_type) { +#ifdef SQLT_TIMESTAMP + case SQLT_TIMESTAMP: + RETVAL_STRING("TIMESTAMP",1); + break; +#endif +#ifdef SQLT_TIMESTAMP_TZ + case SQLT_TIMESTAMP_TZ: + RETVAL_STRING("TIMESTAMP_TZ",1); + break; +#endif case SQLT_DAT: RETVAL_STRING("DATE",1); break;