#31219 [Opn->Csd]: mssql_query() returns false on successful database insert or update
| From: | derick@php.net | Date: | Tue, 21 Dec 2004 07:42:58 +0000 |
| Subject: | #31219 [Opn->Csd]: mssql_query() returns false on successful database insert or update | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-70801@lists.php.net to get a copy of this message | ||
ID: 31219
Updated by: derick@php.net
Reported By: randy at rcs-comp dot com
-Status: Open
+Status: Closed
Bug Type: MSSQL related
Operating System: Windows XP
PHP Version: 5.0.3
New Comment:
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
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-12-21 05:09:00] randy at rcs-comp dot com
Description:
------------
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: http://bugs.php.net/bug.php?id=31135
Also possibly the same problem as this:
http://bugs.php.net/bug.php?id=31195&edit=2
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);
$SQL = "INSERT INTO <<TABLE_NAME>> VALUES <<VALUES>>";
$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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31219&edit=1