|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-28 20:13 UTC] ethan dot nelson at ltd dot org
[2008-02-14 15:12 UTC] sven dot vandorpe at telenet dot be
[2008-02-15 12:35 UTC] sven dot vandorpe at telenet dot be
[2008-10-06 22:13 UTC] felipe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 07:00:01 2025 UTC |
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