|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-06 05:15 UTC] v at sas dot nsk dot su
[2004-04-06 22:01 UTC] v at sas dot nsk dot su
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 09:00:02 2025 UTC |
Description: ------------ Hello! Please take a look for next script: create procedure test @inp1 int as begin if @inp1 >10 return 10 return @inp1; end go This SP just returing values. nothing more. I cannot return record sets - I use this SP from PHP and from another SP. This is a bug? How I can get RETVAL from SP? Thank you. Vladimir Reproduce code: --------------- <? $db=mssql_connect('localhost', '****', '***'); mssql_select_db('mpo'); $stmt = mssql_init ('test'); $ret=0; $inp1=7; mssql_bind($stmt,'RETVAL',&$ret, SQLINT4); mssql_bind($stmt,'@inp1',$inp1, SQLINT4); $res=mssql_execute($stmt); echo "@inp1=".$inp1."\n"; echo "RETVAL=".$ret."\n"; echo "Res is:\n"; print_r($res); echo "\nnext test:\n"; $inp1=64; $stmt = mssql_init ('test'); mssql_bind($stmt,'RETVAL',&$ret, SQLINT4); mssql_bind($stmt,'@inp1',$inp1, SQLINT4); $res=mssql_execute($stmt); echo "@inp1=".$inp1."\n"; echo "RETVAL=".$ret."\n"; echo "Res is:\n"; print_r($res); echo "\ndone\n"; ? Expected result: ---------------- @inp1=7 RETVAL=7 Res is: 1 next test: @inp1=64 RETVAL=10 Res is: 1 done Actual result: -------------- @inp1=7 RETVAL=0 Res is: 1 next test: @inp1=64 RETVAL=0 Res is: 1 done