ID: 43887 Comment by: aventurella at gmail dot com Reported By: coldgrass at gmail dot com Status: Open Bug Type: PDO related Operating System: windows xp PHP Version: 5.2.5 New Comment:
I can confrim this on MySQL and PostgreSQL as well. No PARAM_INPUT_OUTPUT values get bound through PDO when running a stored procedure. http://bugs.php.net/bug.php?id=46657 Previous Comments: ------------------------------------------------------------------------ [2008-10-30 08:56:25] miha dot vrhovnik at domenca dot si Can confirm this on Linux. PHP 5.2.6, connecting to MSSQL 2000 via freetds 0.82RC4 Guys please fix that I had to revert back to mssql_* functions for calling stored procedures. So Now half of project uses PDO the other half the old functional style... ------------------------------------------------------------------------ [2008-01-18 08:32:38] coldgrass at gmail dot com Description: ------------ environment:php5.2.5,mssql server 2005 I can't retrieve stored procedure return values Reproduce code: --------------- $sth = $DB->prepare('exec proc_getDeviceNumByHdType :inpara,:usetable,:num'); $sth->bindParam(":inpara", $para, PDO::PARAM_STR); $sth->bindParam(":usetable", $paraTable, PDO::PARAM_STR); $sth->bindParam(":num", $return, PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,1); $sth->execute(); create procedure [dbo].[proc_getDeviceNumByHdType] @hdtype as varchar(256), @usetable varchar(50), @num int output AS begin DECLARE @sql Nvarchar(1000) SET @sql = N'SELECT @num=COUNT(*) from '+CAST(@usetable AS NVARCHAR(50)) EXECUTE sp_executesql @sql,N'@num int output',@num output end Expected result: ---------------- after call procedure ,there is no return value; Actual result: -------------- should have a value; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43887&edit=1
