A bug was introduced into mssql_execute with version 1.89 of php_mssql.c (as reported in the bug database as bugs #21089 and #21328) which is included in the 4_3 branch. While this patch allowed a SQL Server stored procedure to return multiple record sets, it prevented it from ever returning the values of any output parameters. The call to _mssql_get_sp_result was put inside an else clause that was never called as long as the stored procedure executed correctly.
The attached patch is one solution: it resets the value of retval_results to indicate all results have been read and breaks the else back out into its own if clause. I'm not sure if this is really needed - we may be able to just call _mssql_get_sp_result where this patch adds the reset of the retval_results value. Michael Sisolak [EMAIL PROTECTED] __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
--- php_mssql.orig.c Wed Jan 08 16:24:07 2003 +++ php_mssql.c Wed Jan 08 16:24:58 2003 @@ -2078,8 +2078,11 @@ result->num_rows = _mssql_fetch_batch(mssql_ptr, result, retvalue TSRMLS_CC); result->statement = statement; } + + retval_results=dbresults(mssql_ptr->link); } - else if (retval_results==NO_MORE_RESULTS) { + + if (retval_results==NO_MORE_RESULTS) { _mssql_get_sp_result(mssql_ptr, statement TSRMLS_CC); }
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php