summaryrefslogtreecommitdiff
path: root/ext/odbc/php_odbc.c
diff options
context:
space:
mode:
authorKeyur Govande <keyur@php.net>2014-10-07 21:22:07 +0000
committerKeyur Govande <keyur@php.net>2014-10-07 21:22:07 +0000
commit92f108801e89e4080f8985f0f09f6e7b35397065 (patch)
treeacfeaf75d8e5ae056d36c20561884274da788e19 /ext/odbc/php_odbc.c
parent6f634ebb8c72adf36582deb714e2db36ed21194d (diff)
parentd319a0c1d8f02e89e4c455917e7509f2346e2a6c (diff)
downloadphp-git-92f108801e89e4080f8985f0f09f6e7b35397065.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Add to NEWS Fix for bug #68087 (ODBC not reading DATE columns correctly)
Diffstat (limited to 'ext/odbc/php_odbc.c')
-rw-r--r--ext/odbc/php_odbc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 19f9fe4eb0..b9bee9676a 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -951,14 +951,15 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC)
SQLUSMALLINT colfieldid;
int charextraalloc;
- colfieldid = SQL_COLUMN_DISPLAY_SIZE;
- charextraalloc = 0;
result->values = (odbc_result_value *) safe_emalloc(sizeof(odbc_result_value), result->numcols, 0);
result->longreadlen = ODBCG(defaultlrl);
result->binmode = ODBCG(defaultbinmode);
for(i = 0; i < result->numcols; i++) {
+ charextraalloc = 0;
+ colfieldid = SQL_COLUMN_DISPLAY_SIZE;
+
rc = SQLColAttributes(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_NAME,
result->values[i].name, sizeof(result->values[i].name), &colnamelen, 0);
rc = SQLColAttributes(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_TYPE,