diff options
author | Frank M. Kromann <fmk@php.net> | 2004-04-20 23:30:51 +0000 |
---|---|---|
committer | Frank M. Kromann <fmk@php.net> | 2004-04-20 23:30:51 +0000 |
commit | c5f887173427967f9a53911ea80c7bc13c311042 (patch) | |
tree | 421c1b5163a17fb434c9f522efe0f340d5c0bbb4 | |
parent | 04764e19427ab9bb1ff671e63b968941eb6798cd (diff) | |
download | php-git-c5f887173427967f9a53911ea80c7bc13c311042.tar.gz |
Fix problem getting return value from stored procedure when it returns multiple results
-rw-r--r-- | ext/mssql/php_mssql.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 243ebcbc81..c4708802b5 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -1080,7 +1080,7 @@ static int _mssql_fetch_batch(mssql_link *mssql_ptr, mssql_result *result, int r result->lastresult = retvalue; } efree(column_types); - if (result->statement) { + if (result->statement && (retvalue == NO_MORE_RESULTS || retvalue == NO_MORE_RPC_RESULTS)) { _mssql_get_sp_result(mssql_ptr, result->statement TSRMLS_CC); } return i; @@ -1803,6 +1803,9 @@ PHP_FUNCTION(mssql_next_result) RETURN_FALSE; } else if (retvalue == NO_MORE_RESULTS || retvalue == NO_MORE_RPC_RESULTS) { + if (result->statement) { + _mssql_get_sp_result(mssql_ptr, result->statement TSRMLS_CC); + } RETURN_FALSE; } else { |