|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-01-10 05:20 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
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.