thies Thu Oct 17 04:09:31 2002 EDT
Modified files:
/php4/ext/oci8 oci8.c
Log:
@- Added Oracle TIMESTAMP type to oci8 extension. (thies)
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.176 php4/ext/oci8/oci8.c:1.177
--- php4/ext/oci8/oci8.c:1.176 Thu Sep 12 05:48:02 2002
+++ php4/ext/oci8/oci8.c Thu Oct 17 04:09:31 2002
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.176 2002/09/12 09:48:02 thies Exp $ */
+/* $Id: oci8.c,v 1.177 2002/10/17 08:09:31 thies Exp $ */
/* TODO list:
*
@@ -631,7 +631,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.176 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.177 $");
#ifndef PHP_WIN32
php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION );
php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
@@ -1670,7 +1670,14 @@
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 @@
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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php