diff options
author | Anatol Belski <ab@php.net> | 2014-10-08 09:32:19 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-10-08 09:32:19 +0200 |
commit | 9af9f874c7370bc57564846f333677fac5bed020 (patch) | |
tree | 3c2c781e22ba456ab37531785570e113d4a703ea /ext/odbc/php_odbc.c | |
parent | 62598740aa8e21b304e28988e74241413d08c81d (diff) | |
parent | 9ca16fd80950bc92a4a3b3653304906e42b2d518 (diff) | |
download | php-git-9af9f874c7370bc57564846f333677fac5bed020.tar.gz |
Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
Add to NEWS
Add to NEWS
Fix for bug #68087 (ODBC not reading DATE columns correctly)
Add to NEWS
Add to NEWS
Fix for bug #68114 (Build fails on OS X due to undefined symbols)
Micro optimization
Improved return by reference handling
Diffstat (limited to 'ext/odbc/php_odbc.c')
-rw-r--r-- | ext/odbc/php_odbc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 240f164354..fe8c88e7ad 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -939,14 +939,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, |