From: rajesh dot gala at cgi dot com Operating system: win32 PHP version: 4.3.1 PHP Bug Type: MSSQL related Bug description: Output parameter is not populated
I use MS SQL 2000. I have a simple Stored procedure to be executed. the code is as below the Stored proc is Create PROCEDURE [AuthLoginUser] @LoginUser CHAR(10), @Password CHAR(32), @ReturnVal INT OUTPUT AS BEGIN SELECT @ReturnVal = count(*) FROM [User] USR WHERE USR.[User ID] = @LoginUser AND USR.[Password] = @Password AND USR.[Status]='A' END The php code is as below $stmt = mssql_init("AuthLoginUser", $conn); $LoginUser=$strRegisteredUsername ; $Password=$strRegisteredPassword ; mssql_bind($stmt,"@LoginUser",$LoginUser,SQLVARCHAR); mssql_bind($stmt,"@Password",$Password,SQLVARCHAR); mssql_bind($stmt,"@ReturnVal",$ReturnVal,SQLINT4,True); $result=mssql_execute($stmt); echo '<br><b>Return Value'.$ReturnVal.'</b>'; The problem is that variable $ReturnVal does not get populated I executed the Stored procedure in the query analyser and I get values for the same. Thanks, Rajesh -- Edit bug report at http://bugs.php.net/?id=22294&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22294&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22294&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22294&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22294&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22294&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22294&r=support Expected behavior: http://bugs.php.net/fix.php?id=22294&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22294&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22294&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22294&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22294&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22294&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22294&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22294&r=gnused