php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31195 Query is correctly executed but FALSE is returned.
Submitted: 2004-12-20 10:59 UTC Modified: 2004-12-20 11:26 UTC
From: gtsakiris at dolnet dot gr Assigned:
Status: Closed Package: MSSQL related
PHP Version: 4.3.10 OS: Linux 2.4
Private report: No CVE-ID: None
 [2004-12-20 10:59 UTC] gtsakiris at dolnet dot gr
Description:
------------
I upgraded php from 4.3.8 to 4.3.10 and then I noticed that the mssql_query() function returned FALSE in queries that perform a write in the database (or stored procedures that perform a write), even though the queries were executed and the changes were written in the tables.
I re-installed 4.3.8 again and I restored the expected behaviour of mssql_query().
In SELECT queries nothing strange happened, I got a result handle as expected.

Reproduce code:
---------------
$mssql = mssql_connect( "dbhost", "dbuser", "dbpass" );
mssql_select_db ("dbname" );
$res = mssql_query( "***a valid INSERT/UPDATE query***" );

if ($res === false)
{
  echo "mssql_query returned false.\n";
}
else
{
  echo "mssql_query returned true.\n";
}

Expected result:
----------------
If the query is correct, I would expect that true was returned.

Actual result:
--------------
Even though the query is correct I get the false message...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-20 11:26 UTC] derick@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 05:01:29 2024 UTC