ID: 25817
Updated by: [EMAIL PROTECTED]
Reported By: fjortiz at comunet dot es
-Status: Open
+Status: Assigned
Bug Type: MSSQL related
Operating System: Windows
PHP Version: 4.3.4RC2-dev
Assigned To: fmk
Previous Comments:
------------------------------------------------------------------------
[2003-10-10 04:24:58] fjortiz at comunet dot es
Description:
------------
I helped create the mssql_execute function, and I see a bug has been
introduced since 4.1.1 (last time I saw the code)
If you craft a stored procedure returning BOTH a recordset and output
variables, you'll only get the recordset, not the output variables.
This worked fine in 4.1.1
Here is the problem:
php_mssql.c, line 2110
if ((num_fields = dbnumcols(mssql_ptr->link)) > 0) {
// then get recordset...
}
else { // get output variables
_mssql_get_sp_result(mssql_ptr, statement TSRMLS_CC);
}
this is wrong. You can get both of them. This is it:
if ((num_fields = dbnumcols(mssql_ptr->link)) > 0) {
// then get recordset...
}
// and ALWAYS get the output variables
_mssql_get_sp_result(mssql_ptr, statement TSRMLS_CC);
I recompiled 4.3.3 php_mssql.dll with this and it works as expected
(and as it was back in 4.1.1)
BTW it's in 4.3.4rc1 too.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25817&edit=1