#43887 [Opn->Fbk]: mssql2005 PROCEDURE PDO::PARAM_INPUT_OUTPUT
| From: | jani@php.net | Date: | Sat, 25 Apr 2009 14:54:05 +0000 |
| Subject: | #43887 [Opn->Fbk]: mssql2005 PROCEDURE PDO::PARAM_INPUT_OUTPUT | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136269@lists.php.net to get a copy of this message | ||
ID: 43887
Updated by: jani@php.net
Reported By: coldgrass at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: PDO related
-Operating System: windows xp
+Operating System: *
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2008-11-26 22:39:06] aventurella at gmail dot com
forgot my php/OS version: 5.2.6 on OS X 10.5.5
------------------------------------------------------------------------
[2008-11-26 22:37:50] aventurella at gmail dot com
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
------------------------------------------------------------------------
[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