Edit report at http://bugs.php.net/bug.php?id=50555&edit=1
ID: 50555 Comment by: a at exampl dot com Reported by: david dot wright at opticsplanet dot com Summary: Cannot retrieve output parameter from stored procedure Status: Open Type: Bug Package: PDO related Operating System: 2.6.24-24-server PHP Version: 5.3.1 New Comment: For fucks sake would anybody already fix this? It's not the only report about this issue in the tracker. Previous Comments: ------------------------------------------------------------------------ [2009-12-22 22:09:39] david dot wright at opticsplanet dot com Description: ------------ I cannot retrieve an output parameter from a stored procedure (in my case on SQL Server 2005--am using PDO_DBLIB. Reproduce code: --------------- PHP Code: --------------------------------------------------- /** SNIP. Set up a valid $db here! **/ $return_value = 999; $sth = $db->prepare("EXEC dbo.opsp_Test ?"); $sth->bindParam(1, $return_value, PDO::PARAM_STR | PDO::PARAM_INPUT_OUTPUT, 4); $sth->execute(); echo "$return_value\n"; Stored Procedure -------------------------------------------------- CREATE PROCEDURE opsp_Test @TheOutputValue int OUTPUT AS BEGIN SET @TheOutputValue = 11 END Expected result: ---------------- output should be: 11 Actual result: -------------- Output is 999 ($return_value unchanged) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=50555&edit=1