php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8627 mssql_query and stored procedures
Submitted: 2001-01-10 05:20 UTC Modified: 2002-07-08 01:00 UTC
Votes:3
Avg. Score:3.0 ± 1.6
Reproduced:2 of 3 (66.7%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: laurent dot lacroix at skiplan dot com Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 4.0.3pl1 OS: Windows NT 4.0
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: laurent dot lacroix at skiplan dot com
New email:
PHP Version: OS:

 

 [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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-07 10:59 UTC] k.schroeder@php.net
Please try to recover with PHP 4.2.1.
 [2002-07-08 01:00 UTC] 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".
 [2009-06-17 16:05 UTC] roysimkes at gmail dot com
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC