]> granicus.if.org Git - php/commitdiff
fix bug #33214 (odbc_next_result does not signal SQL errors with 2-statement SQL...
authorAntony Dovgal <tony2001@php.net>
Thu, 2 Jun 2005 15:40:45 +0000 (15:40 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 2 Jun 2005 15:40:45 +0000 (15:40 +0000)
Path by rich at kastle dot com.

ext/odbc/php_odbc.c

index 3cb6b7f639409dfb0737455176fa98540ac3048d..1b11986d20b483abf89ce26ae91a0a3f8877eed8 100644 (file)
@@ -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;
        }
 }