summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank M. Kromann <fmk@php.net>2004-04-20 23:30:51 +0000
committerFrank M. Kromann <fmk@php.net>2004-04-20 23:30:51 +0000
commitc5f887173427967f9a53911ea80c7bc13c311042 (patch)
tree421c1b5163a17fb434c9f522efe0f340d5c0bbb4
parent04764e19427ab9bb1ff671e63b968941eb6798cd (diff)
downloadphp-git-c5f887173427967f9a53911ea80c7bc13c311042.tar.gz
Fix problem getting return value from stored procedure when it returns multiple results
-rw-r--r--ext/mssql/php_mssql.c5
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 {