#19370 [NEW]: Stored procedure with multiple row sets
| From: | pvy at novosoft dot ru | Date: | Thu, 12 Sep 2002 09:03:25 +0000 |
| Subject: | #19370 [NEW]: Stored procedure with multiple row sets | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-19219@lists.php.net to get a copy of this message | ||
From: pvy@novosoft.ru
Operating system: windows 2000/sp3
PHP version: 4.2.3
PHP Bug Type: MSSQL related
Bug description: Stored procedure with multiple row sets
Hello!
I create next procedure in MSSQL 7.0:
CREATE PROCEDURE z_test AS
begin
select 1
select 2
select 3
return 2003
end
then I wrote next script:
<?php
error_reporting(32767);
mssql_connect ( '***', '*****','******' );
mssql_select_db('my_db');
for ($i=1; $i<5; $i++) {
$stmt=mssql_init("z_test");
$result=mssql_execute($stmt);
mssql_free_result($result);
}
?>
and got next answer from php:
Warning: mssql_execute: multiple recordsets from a stored procedure not
supported yet! (Skipping...) in D:\project
s\eve\htdocs\mssql.php on line 9
Warning: MS SQL: stored procedure execution failed. in
D:\projects\eve\htdocs\mssql.php on line 9
Warning: mssql_free_result(): supplied argument is not a valid MS
SQL-result resource in D:\projects\eve\htdocs\mss
ql.php on line 9
Warning: MS SQL: unable to init stored procedure in
D:\projects\eve\htdocs\mssql.php on line 9
Warning: mssql_execute(): supplied argument is not a valid MS
SQL-Statement resource in D:\projects\eve\htdocs\mssq
l.php on line 9
Warning: mssql_free_result(): supplied argument is not a valid MS
SQL-result resource in D:\projects\eve\htdocs\mss
ql.php on line 9
Warning: MS SQL: unable to init stored procedure in
D:\projects\eve\htdocs\mssql.php on line 9
Warning: mssql_execute(): supplied argument is not a valid MS
SQL-Statement resource in D:\projects\eve\htdocs\mssq
l.php</b> on line 9
Warning: mssql_free_result(): supplied argument is not a valid MS
SQL-result resource in D:\projects\eve\htdocs\mss
ql.php on line 9
As I understand this log - first time _execute function get normal result
resource but in next we see "unable to init" error.
How I can clear old result set for prevent these errors?
and also, how I can get number in 'return' string?
Thanks in advise,
Vladimir.
--
Edit bug report at http://bugs.php.net/?id=19370&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19370&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19370&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19370&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19370&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19370&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19370&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19370&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19370&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19370&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19370&r=globals