From:             ville dot tuomola at mehilainen dot fi
Operating system: Fedora 8
PHP version:      5.2.5
PHP Bug Type:     MSSQL related
Bug description:  mssql_execute() stored procedure has no return value.

Description:
------------
When executing a stored procedure with mssql_execute, it does not return 
the return value of the procedure.

It does not matter whether the "skip_results" parameters is used in
mssql_execute or not.

Reproduce code:
---------------
CREATE  PROC sp_Test

AS

RETURN 2

<?php
$myServer = "sqlserver";
$myUser = "dbuser";
$myPass = "pass";
$myDB = "db";

$s = mssql_connect($myServer, $myUser, $myPass) or die("Couldn't connect
to SQL Server on $myServer");

mssql_select_db($myDB, $s) or die("Couldn't open database $myDB");

$proc = mssql_init("sp_Test", $s);

mssql_bind($proc, "RETVAL", $ret, SQLINT2);

//mssql_execute($proc);

mssql_execute($proc, true);

mssql_free_statement ($proc);
mssql_close($s);

echo "<h2>sp_Test returned: $ret</h2>";
?>

Expected result:
----------------
sp_Test returned: 2

Actual result:
--------------
Warning: mssql_execute() [function.mssql-execute]: stored procedure has no
return value. Nothing was returned into RETVAL in
/var/www/vkajanvaraus/htdocs/test.php on line 20
sp_Test returned: 0

-- 
Edit bug report at http://bugs.php.net/?id=43616&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43616&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43616&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43616&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43616&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43616&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43616&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43616&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43616&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43616&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43616&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43616&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43616&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43616&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43616&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43616&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43616&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43616&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43616&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43616&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43616&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43616&r=mysqlcfg

Reply via email to