ZF-348: Zend_DB: Stored Procedure Example

Description

In the Zend_Db section of the manual, there should be an example of making a stored procedure call using PDO.

Comments

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

Changing fix version to 0.8.0.

Recategorize as Documentation, Zend_Db.

Updating to follow standard for documentation issues.

This issue should have been fixed for the 1.5 release.

Please categorize/fix as needed.

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Reassigning as Ralph is the maintainer of Zend_Db

Reviewed and on the radar.

This example should be something found on the php.net manual and doesn't actually have anything specifically to do with Zend Framework.

"This example should be something found on the php.net manual and doesn't actually have anything specifically to do with Zend Framework."

While it is nice if there are docs on the php.net manual, doesn't the Zend_Db have quite a different syntax to plain PHP? AFAIK, there are no "prepare", "bindParam", or "execute" functions on php.net. I think this is ZF specific? If so, please document it.

There are examples of using Zend_Db in the ZF manual. While portions of the ZF manual are not ZF specific, they are none the less included to give the user a clearer picture of how things fit together. If you left all the SQL fragments out of the ZF manual, see how clear that would be.