|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23434 multiple recordset in one query
Submitted: 2003-05-01 03:49 UTC Modified: 2003-05-20 03:13 UTC
From: marco_m at inbox dot lv Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.3.1 OS: Windows XP pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: marco_m at inbox dot lv
New email:
PHP Version: OS:


 [2003-05-01 03:49 UTC] marco_m at inbox dot lv
1) original code is:
$myServer    = "localhost";
$myUser      = "sa";
$myPass      = "sa";
$myDB        = "DB_NAME";

$db1 = @mssql_connect($myServer,$myUser,$myPass);

$sp  = mssql_init("STORED PROCEDURE",$db1);
$rs1 = mssql_execute($sp);

$rs2 = mssql_query("SELECT * FROM TABLE_NAME");

 echo "<br>".$frs2["ID"];

while ($frs1 = mssql_fetch_array($rs1))
 echo "<br>".$frs1["A_TYPE"];

problem description:

this simple example works good when STORED_PROCEDURE ( see in $rs1 execute statement ) has only one recordset returned in query. 

But when STORED_PROCEDURE has more than one recordset returned in one query i get the error like 

mssql_query() [function.mssql-query]: Query failed in.... 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-20 01:46 UTC]
This is not a bug.

MSSQL server can not execute a new SQL statement while data is pending.

You must either fetch all results, release the query or use multiple connections to the server.
 [2003-05-20 03:13 UTC]
Not a bug -> bogus
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 10:01:30 2024 UTC