From:             patrick dot schutte at gmx dot de
Operating system: Suse8.2
PHP version:      5.0.0
PHP Bug Type:     MSSQL related
Bug description:  Executing Stored Procedure with more than one Resultset

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 bug report at http://bugs.php.net/?id=29316&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29316&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29316&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29316&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29316&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29316&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29316&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29316&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29316&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29316&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29316&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29316&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29316&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29316&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29316&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29316&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29316&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29316&r=float

Reply via email to