Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ext/odbc/php_odbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,13 @@ static void php_odbc_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
rc = SQLFetch(result->stmt);

if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
if (rc == SQL_ERROR) {
#ifdef HAVE_SQL_EXTENDED_FETCH
odbc_sql_error(result->conn_ptr, result->stmt, "SQLExtendedFetch");
#else
odbc_sql_error(result->conn_ptr, result->stmt, "SQLFetch");
#endif
}
RETURN_FALSE;
}

Expand Down Expand Up @@ -1576,6 +1583,13 @@ PHP_FUNCTION(odbc_fetch_into)
rc = SQLFetch(result->stmt);

if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
if (rc == SQL_ERROR) {
#ifdef HAVE_SQL_EXTENDED_FETCH
odbc_sql_error(result->conn_ptr, result->stmt, "SQLExtendedFetch");
#else
odbc_sql_error(result->conn_ptr, result->stmt, "SQLFetch");
#endif
}
RETURN_FALSE;
}

Expand Down Expand Up @@ -1703,6 +1717,13 @@ PHP_FUNCTION(odbc_fetch_row)
rc = SQLFetch(result->stmt);

if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
if (rc == SQL_ERROR) {
#ifdef HAVE_SQL_EXTENDED_FETCH
odbc_sql_error(result->conn_ptr, result->stmt, "SQLExtendedFetch");
#else
odbc_sql_error(result->conn_ptr, result->stmt, "SQLFetch");
#endif
}
RETURN_FALSE;
}

Expand Down Expand Up @@ -1792,6 +1813,13 @@ PHP_FUNCTION(odbc_result)
rc = SQLFetch(result->stmt);

if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) {
if (rc == SQL_ERROR) {
#ifdef HAVE_SQL_EXTENDED_FETCH
odbc_sql_error(result->conn_ptr, result->stmt, "SQLExtendedFetch");
#else
odbc_sql_error(result->conn_ptr, result->stmt, "SQLFetch");
#endif
}
RETURN_FALSE;
}

Expand Down