#29316 [Opn->Fbk]: Executing Stored Procedure with more than one Resultset
| From: | sniper@php.net | Date: | Sun, 06 Mar 2005 19:51:39 +0000 |
| Subject: | #29316 [Opn->Fbk]: Executing Stored Procedure with more than one Resultset | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-74966@lists.php.net to get a copy of this message | ||
ID: 29316
Updated by: sniper@php.net
Reported By: patrick dot schutte at gmx dot de
-Status: Open
+Status: Feedback
Bug Type: MSSQL related
Operating System: Suse8.2
PHP Version: 5.0.0
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-07-22 10:35:13] patrick dot schutte at gmx dot de
Description:
------------
I've written stored Procedures that returns 2 and more Resultsets
(Select-Querys). If one of theese Results doesn't have any Matches I
get the next one instead.
System: Suse8.2, freetds 0.62.3 ./configure ... --with-mssql
freetds with TDS-Version 7.0 and MSSQL-Server2000. Same Code works fine
with WindowsNT4.0
Reproduce code:
---------------
CREATE PROCEDURE [dbo].[dt_mehrfach] AS
-- first Query: no match
SELECT * FROM tbl_haribo
WHERE id=10000
-- second Query: 15 matches
SELECT * FROM tbl_haribo
PHP:
$p=mssql_init("dt_mehrfach);
$result=mssql_execute($p);
echo mssql_num_rows($result)."<br />\n";
mssql_next_result($result);
echo mssql_num_rows($result);
Expected result:
----------------
0
15
would be ok
Actual result:
--------------
but I get
15
15
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29316&edit=1