output parameters in prepared statement

From: Date: Thu, 24 Jun 2004 14:06:30 +0000
Subject: output parameters in prepared statement
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13307@lists.php.net to get a copy of this message
How do I specify an output parameter in a prepared statement? I'm calling a stored procedure on a remote DB2 database that takes two arguments: one input argument and one output argument. The stored proc returns a result set. How do I specify the output parameter in my PHP code? Here's what I have so far (I've tried numerous variations, but none of them work): $rc = 99; $args = array($client_nbr, ':$rc'); $query = "call WEB001SP (?, !)"; $pstmt = $db->prepare($query); $rs = $db->execute($pstmt, $args); This solution results in the following error statement from DB2: [DB2 UDB]SQL0312 - Variable $RC not defined or not usable. Any thoughts? ________________________________________________________ Alan Partis thundernet development group

« previous php.pear.general (#13307) next »