From: Antony Dovgal Date: Thu, 2 Jun 2005 15:40:45 +0000 (+0000) Subject: fix bug #33214 (odbc_next_result does not signal SQL errors with 2-statement SQL... X-Git-Tag: php-5.0.1b1~109 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7e450f528cc44ac7096e3e0a5c9a2fad4ed59417;p=php fix bug #33214 (odbc_next_result does not signal SQL errors with 2-statement SQL batches). Path by rich at kastle dot com. --- diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 3cb6b7f639..1b11986d20 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2479,8 +2479,10 @@ PHP_FUNCTION(odbc_next_result) result->values = NULL; } RETURN_TRUE; - } - else { + } else if (rc == SQL_NO_DATA_FOUND) { + RETURN_FALSE; + } else { + odbc_sql_error(result->conn_ptr, result->stmt, "SQLMoreResults"); RETURN_FALSE; } }