]> granicus.if.org Git - php/commitdiff
Changed the dbx_oci8 behaviour to return lowercase column-names,
authorMarc Boeren <mboeren@php.net>
Thu, 24 Oct 2002 14:26:14 +0000 (14:26 +0000)
committerMarc Boeren <mboeren@php.net>
Thu, 24 Oct 2002 14:26:14 +0000 (14:26 +0000)
which is a hack but at least it makes it easier for users
to create portable apps.
# Perhaps this should be controlled by a (.ini?) directive or define
# which determines the change (toupper, tolower, nochange)?

ext/dbx/dbx_oci8.c

index efdfbea472e84366dd1a35a4bd627ff127670bdf..95216487f7ac198deb51236a701470b2be23eadb 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "dbx.h"
 #include "dbx_oci8.h"
+#include "ext/standard/php_string.h" /* for auto-change column names to lowercase*/
 
 #define OCI_ASSOC        1<<0
 #define OCI_NUM          1<<1
@@ -178,6 +179,7 @@ int dbx_oci8_getcolumnname(zval **rv, zval **result_handle, long column_index, I
                return 0;
        }
        FREE_ZVAL(zval_column_index);
+       php_strtolower(Z_STRVAL_P(returned_zval), Z_STRLEN_P(returned_zval));
        MOVE_RETURNED_TO_RV(rv, returned_zval);
        return 1;
 }