ID: 8627 Comment by: roysimkes at gmail dot com Reported By: laurent dot lacroix at skiplan dot com Status: No Feedback Bug Type: MSSQL related Operating System: Windows NT 4.0 PHP Version: 4.0.3pl1 New Comment:
The same kind of error occurs for me on PHP 5. The version is: PHP Version => 5.2.6-1+lenny2 and I'm on a debian server (lenny as you may guess.) This was the only issue I had found out about this problem so I guess this is the right place even this feedback is seven years late :) So the problem is as described: I have a code block like: //Mssql connection $res = mssql_query("EXEC SP_CAUSING_ERROR"); if (!$res) { logSomething(); } $res2 = mssql_query("SELECT * FROM foo"); //The res2 is false... if (!$res2) { //$res2 is false, even the query is valid and should had to return a valid result. } Connection seem to be fine but once an error occurs on the stored procedures, mssql_query never executes the query and always return false. I do not know what the problem is or how can be solved. Previous Comments: ------------------------------------------------------------------------ [2002-07-08 01:00:09] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-06-07 10:59:34] k.schroe...@php.net Please try to recover with PHP 4.2.1. ------------------------------------------------------------------------ [2001-01-10 05:20:27] laurent dot lacroix at skiplan dot com when i call a stored procedure with mssql_query and if this stored procedure raises an error then msssql_query returns false here all is ok. the problem is that all the following calls to mssql_query (in the same php script) also return false whereas they should work. example : $result1 = mssql_query("stored_proc_that_raise_an_error"); -- here mssql_query returns false $result2 = mssql_query("select * from MY_TABLE"); -- here $result2 also contains false whereas the -- "select" query should work even if the precedent query -- crash The same script using obdc functions instead of mssql works fine. If the code of the stored procedure is passed as parameter of mssql_query then the "select" query correctly works ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=8627&edit=1