diff options
author | Anatol Belski <ab@php.net> | 2015-04-17 17:13:45 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-04-17 17:13:45 +0200 |
commit | 042fa25896a4ff04bf004d6f21c84a3aa30a4e91 (patch) | |
tree | 38385d24e24bf3242f6f91c6fe99273b17182392 /ext/odbc/php_odbc.c | |
parent | 342acbe1c6f1c01ef994cd1084165967fc6618a7 (diff) | |
parent | e09febb286b08a0a7bdbd8a63435eac8963906c4 (diff) | |
download | php-git-042fa25896a4ff04bf004d6f21c84a3aa30a4e91.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
fix column name attribute with ODBC 3.0
migrate SQLAllocStmt for ODBC 3.0 compliance
Diffstat (limited to 'ext/odbc/php_odbc.c')
-rw-r--r-- | ext/odbc/php_odbc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 0606eba2a4..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); @@ -1181,7 +1181,7 @@ PHP_FUNCTION(odbc_prepare) result->numparams = 0; - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -1609,7 +1609,7 @@ PHP_FUNCTION(odbc_exec) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); efree(result); @@ -3110,7 +3110,7 @@ PHP_FUNCTION(odbc_tables) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3177,7 +3177,7 @@ PHP_FUNCTION(odbc_columns) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3247,7 +3247,7 @@ PHP_FUNCTION(odbc_columnprivileges) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3323,7 +3323,7 @@ PHP_FUNCTION(odbc_foreignkeys) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3389,7 +3389,7 @@ PHP_FUNCTION(odbc_gettypeinfo) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3446,7 +3446,7 @@ PHP_FUNCTION(odbc_primarykeys) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3512,7 +3512,7 @@ PHP_FUNCTION(odbc_procedurecolumns) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3579,7 +3579,7 @@ PHP_FUNCTION(odbc_procedures) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3647,7 +3647,7 @@ PHP_FUNCTION(odbc_specialcolumns) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3716,7 +3716,7 @@ PHP_FUNCTION(odbc_statistics) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); @@ -3779,7 +3779,7 @@ PHP_FUNCTION(odbc_tableprivileges) result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); - rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); + rc = PHP_ODBC_SQLALLOCSTMT(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { efree(result); php_error_docref(NULL TSRMLS_CC, E_WARNING, "SQLAllocStmt error 'Invalid Handle'"); |