summaryrefslogtreecommitdiff
path: root/ext/odbc/php_odbc.c
diff options
context:
space:
mode:
authorKeyur Govande <keyur@php.net>2014-10-07 21:23:04 +0000
committerKeyur Govande <keyur@php.net>2014-10-07 21:23:04 +0000
commit9ca16fd80950bc92a4a3b3653304906e42b2d518 (patch)
tree354f59c0e85b231fdeec3b14a05cf610c666f0d2 /ext/odbc/php_odbc.c
parentf17bf044409d35370b5e2c8c393f4e7fe6924dbc (diff)
parent3bd8ac67104a8a794f54dcc259bbdf1e4f9d62c4 (diff)
downloadphp-git-9ca16fd80950bc92a4a3b3653304906e42b2d518.tar.gz
Merge branch 'PHP-5.6'
* PHP-5.6: Add to NEWS 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 13bd9e1628..6729163996 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -945,14 +945,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,