|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33214 [PATCH] odbc_next_result does not signal SQL errors
Submitted: 2005-06-01 17:35 UTC Modified: 2005-06-02 17:43 UTC
From: rich at kastle dot com Assigned: kalowsky (profile)
Status: Closed Package: ODBC related
PHP Version: 5.*, 4.* OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: rich at kastle dot com
New email:
PHP Version: OS:


 [2005-06-01 17:35 UTC] rich at kastle dot com
(This bug is in all versions of PHP since 4.*; the patch is against PHP 5.0.4)

If a 2-statement SQL batch is executed, where the first SQL statement completes correctly but the second SQL statement yeilds an error, there is no error indication given by odbc_next_result; you simply get FALSE.

I have a patch to correct this:

--- ext/odbc/php_odbc.c~	2005-01-18 10:07:10.000000000 -0500
+++ ext/odbc/php_odbc.c	2005-06-01 11:01:25.176471600 -0400
@@ -2439,5 +2463,8 @@
-	else {
+	else if(rc == SQL_NO_DATA_FOUND) {
+	} else {
+		odbc_sql_error(result->conn_ptr, result->stmt, "SQLMoreResults");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-02 17:43 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Sep 28 12:05:52 2022 UTC