Details
-
Type:
Docs: Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 0.1.5
-
Fix Version/s: None
-
Component/s: Zend_Db
-
Labels:None
-
Language:English
Description
In the Zend_Db section of the manual, there should be an example of making a stored procedure call using PDO.
There are no examples in the manual either showing how to do the following example using a Zend_Db instance using the PDO_MYSQL adapter.
Example 3. Call a stored procedure with an INOUT parameter
<?php /* Call a stored procedure with an INOUT parameter */ $colour = 'red'; $sth = $dbh->prepare('CALL puree_fruit(?)'); $sth->bindParam(1, $colour, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 12); $sth->execute(); print("After pureeing fruit, the colour is: $colour"); ?>http://www.php.net/pdostatement-bindparam
<?php /* Call a stored procedure with an INOUT parameter */ $colour = 'red'; $sth = $dbh->prepare('CALL puree_fruit(?)'); $sth->bindParam(1, $colour, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 12); $sth->execute(); print("After pureeing fruit, the colour is: $colour"); ?>