fmk Mon Nov 17 15:53:29 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mssql php_mssql.c Log: Fix for bug #25817 Check for a return value from a stored procedure right after fetching rows Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.86.2.25 php-src/ext/mssql/php_mssql.c:1.86.2.26 --- php-src/ext/mssql/php_mssql.c:1.86.2.25 Tue Oct 14 23:32:18 2003 +++ php-src/ext/mssql/php_mssql.c Mon Nov 17 15:53:28 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.86.2.25 2003/10/15 03:32:18 iliaa Exp $ */ +/* $Id: php_mssql.c,v 1.86.2.26 2003/11/17 20:53:28 fmk Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -1061,6 +1061,9 @@ result->lastresult = retvalue; } efree(column_types); + if (result->statement) { + _mssql_get_sp_result(mssql_ptr, result->statement TSRMLS_CC); + } return i; } @@ -1788,9 +1791,6 @@ RETURN_FALSE; } else if (retvalue == NO_MORE_RESULTS || retvalue == NO_MORE_RPC_RESULTS) { - if (result->statement) { - _mssql_get_sp_result(result->mssql_ptr, result->statement TSRMLS_CC); - } RETURN_FALSE; } else { @@ -2120,11 +2120,8 @@ result->num_fields = num_fields; result->fields = (mssql_field *) emalloc(sizeof(mssql_field)*num_fields); - result->num_rows = _mssql_fetch_batch(mssql_ptr, result, retvalue TSRMLS_CC); result->statement = statement; - } - else { - _mssql_get_sp_result(mssql_ptr, statement TSRMLS_CC); + result->num_rows = _mssql_fetch_batch(mssql_ptr, result, retvalue TSRMLS_CC); } } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php