|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31219 mssql_query() returns false on successful database insert or update
Submitted: 2004-12-21 05:09 UTC Modified: 2004-12-21 08:42 UTC
From: randy at rcs-comp dot com Assigned:
Status: Closed Package: MSSQL related
PHP Version: 5.0.3 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: randy at rcs-comp dot com
New email:
PHP Version: OS:


 [2004-12-21 05:09 UTC] randy at rcs-comp dot com
Upon a successful database modification, mssql_query should return true.  However, in 5.0.3, it returns false.

I went back to 5.0.2 and the bug was not present.

Possibly related to:

Also possibly the same problem as this:

Although I still posted the bug because the above bug is in a different PHP version.

Reproduce code:
$link = mssql_connect('<<SERVER>>', "<<LOGIN>>", "");
   mssql_select_db("<<DB_NAME>>", $link);
   $rs = mssql_query($SQL, $link);
   if (!$rs) {
            echo "problem";
   } else {
            echo "worked";

Expected result:
The DB should be updated and "worked" should be displayed

Actual result:
The DB is updated and "problem" is displayed


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-21 08:42 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-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 07:01:30 2024 UTC