ID: 40901 Updated by: [EMAIL PROTECTED] Reported By: lh at moranti dot com -Status: Open +Status: Assigned Bug Type: MSSQL related Operating System: ubuntu PHP Version: 5.2.1 Assigned To: fmk
Previous Comments: ------------------------------------------------------------------------ [2007-03-26 11:14:54] lh at moranti dot com can i see your phpinfo ? ------------------------------------------------------------------------ [2007-03-23 17:34:01] [EMAIL PROTECTED] I've tested your sample code and it works just fine om my system. I did modify it to get the return value back though: $int=10; $sp = mssql_init("test", $con); // stored proc name mssql_bind($sp, "@sval", $int, SQLINT4); mssql_bind($sp, "RETVAL", $ret, SQLINT4); $query = mssql_execute($sp) or die("oops"); echo "$ret\n"; mssql_close($con); ------------------------------------------------------------------------ [2007-03-23 11:20:07] lh at moranti dot com Sorry the code schould look like this <? $conn = mssql_connect("host","user","pass"); mssql_select_db("dbscheme", $conn); $int=10; $sp = mssql_init("test", $conn); // stored proc name mssql_bind($sp, "@sval ",$int,SQLINT4); $query = mssql_execute($sp) or die("oops"); ?> ------------------------------------------------------------------------ [2007-03-23 11:15:14] lh at moranti dot com The storedprocedure looks like this: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go CREATE PROCEDURE [dbo].[test] ( @sval int ) AS return @sval+10 And the php code looks like this <? $conn = mssql_connect("host","user","pass"); mssql_select_db("dbscheme", $conn); $sp = mssql_init("test", $conn); // stored proc name $query = mssql_execute($sp) or die("oops"); ?> is fails in this line "$query = mssql_execute($sp) or die("oops");" ------------------------------------------------------------------------ [2007-03-23 10:56:53] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40901 -- Edit this bug report at http://bugs.php.net/?id=40901&edit=1