From: php at yvanrodrigues dot com Operating system: Windows 2000/IIS 5.0/PHP 4.3.11 PHP version: 4.3.10 PHP Bug Type: MSSQL related Bug description: return value of mssql_query changed in 4.3.10, no longer returns accurate rslt.
Description: ------------ Previous to 4.3.10, mssql_query returned the following: === a valid result set OR === true if successful but no result set OR === false if an error occurred Therefore if one wanted to check for an error one would use: if(mssql_query === false) { echo 'yikes!'; } Since 4.3.10, when using mssql_query to execute an INSERT query, a result of false is returned even if the row was successfully inserted. Reproduce code: --------------- $query = "INSERT INTO DOGBERT (CATBERT) VALUES ('DILBERT')"; $rs = mssql_query($query); if($rs === false) { echo 'This should only print when there is an error'; } Expected result: ---------------- $rs should only evaluate === false when there is an error (according to the docs) Actual result: -------------- $rs always evaluates === false on INSERT -- Edit bug report at http://bugs.php.net/?id=31587&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31587&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31587&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31587&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31587&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31587&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31587&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31587&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31587&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31587&r=support Expected behavior: http://bugs.php.net/fix.php?id=31587&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31587&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31587&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31587&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31587&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31587&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31587&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31587&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31587&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31587&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31587&r=mysqlcfg