diff options
author | Anatol Belski <ab@php.net> | 2015-04-17 17:10:46 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-04-17 17:10:46 +0200 |
commit | e09febb286b08a0a7bdbd8a63435eac8963906c4 (patch) | |
tree | a206b0a7bf31eef1cef666f2579b037b300d7996 /ext/odbc | |
parent | db1596c8b14aca00938c7b301db377f6355a5127 (diff) | |
download | php-git-e09febb286b08a0a7bdbd8a63435eac8963906c4.tar.gz |
fix column name attribute with ODBC 3.0
Diffstat (limited to 'ext/odbc')
-rw-r--r-- | ext/odbc/php_odbc.c | 2 | ||||
-rw-r--r-- | ext/odbc/php_odbc_includes.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 6945b50f7e..231e8144f9 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -960,7 +960,7 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC) charextraalloc = 0; colfieldid = SQL_COLUMN_DISPLAY_SIZE; - rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), PHP_ODBC_DESC_BASE_COLUMN_NAME, + rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), PHP_ODBC_SQL_DESC_NAME, result->values[i].name, sizeof(result->values[i].name), &colnamelen, 0); rc = PHP_ODBC_SQLCOLATTRIBUTE(result->stmt, (SQLUSMALLINT)(i+1), SQL_COLUMN_TYPE, NULL, 0, NULL, &result->values[i].coltype); diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index 5b61fc3d1e..07fe07e7a2 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -285,14 +285,14 @@ void odbc_sql_error(ODBC_SQL_ERROR_PARAMS); #define PHP_ODBC_SQLCOLATTRIBUTE SQLColAttribute #define PHP_ODBC_SQLALLOCSTMT(hdbc, phstmt) SQLAllocHandle(SQL_HANDLE_STMT, hdbc, phstmt) -#define PHP_ODBC_DESC_BASE_COLUMN_NAME SQL_DESC_BASE_COLUMN_NAME +#define PHP_ODBC_SQL_DESC_NAME SQL_DESC_NAME #else #define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR) #define PHP_ODBC_SQLCOLATTRIBUTE SQLColAttributes #define PHP_ODBC_SQLALLOCSTMT SQLAllocStmt -#define PHP_ODBC_DESC_BASE_COLUMN_NAME SQL_COLUMN_NAME +#define PHP_ODBC_SQL_DESC_NAME SQL_COLUMN_NAME #endif #define IS_SQL_BINARY(x) (x == SQL_BINARY || x == SQL_VARBINARY || x == SQL_LONGVARBINARY) |