ID: 40901 Comment by: marcio dot muzzi at gmail dot com Reported By: lh at moranti dot com Status: No Feedback Bug Type: MSSQL related Operating System: ubuntu PHP Version: 5.2.1 Assigned To: fmk New Comment:
I had the same problem and managed to solve as follows: $sp = "procedurename"; $compId=1000; $sql = "$sp $compId"; $query = mssql_query($sql); $data = mssql_fetch_array($query); This is not the most elegant way (do not use bind), but it works. Previous Comments: ------------------------------------------------------------------------ [2009-03-03 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-02-24 00:50:48] [email protected] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [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"); ?> ------------------------------------------------------------------------ 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
