#31219 [NEW]: mssql_query() returns false on successful database insert or update
| From: | randy at rcs-comp dot com | Date: | Tue, 21 Dec 2004 04:09:00 +0000 |
| Subject: | #31219 [NEW]: mssql_query() returns false on successful database insert or update | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-70763@lists.php.net to get a copy of this message | ||
From: randy at rcs-comp dot com
Operating system: Windows XP
PHP version: 5.0.3
PHP Bug Type: MSSQL related
Bug description: mssql_query() returns false on successful database insert or update
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 bug report at http://bugs.php.net/?id=31219&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31219&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31219&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31219&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31219&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31219&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31219&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31219&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31219&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31219&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31219&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31219&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31219&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31219&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31219&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31219&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31219&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31219&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31219&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31219&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31219&r=mysqlcfg