Zend Framework

Zend_DB: Stored Procedure Example

Details

  • Type: Docs:  Improvement Docs: Improvement
  • Status: Resolved Resolved
  • Priority: Minor 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.

Issue Links

Activity

Hide
Gavin added a comment -

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

Show
Gavin added a comment - 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
Hide
Bill Karwin added a comment -

Changing fix version to 0.8.0.

Show
Bill Karwin added a comment - Changing fix version to 0.8.0.
Hide
Bill Karwin added a comment -

Recategorize as Documentation, Zend_Db.

Show
Bill Karwin added a comment - Recategorize as Documentation, Zend_Db.
Hide
Wil Sinclair added a comment -

Updating to follow standard for documentation issues.

Show
Wil Sinclair added a comment - Updating to follow standard for documentation issues.
Hide
Wil Sinclair added a comment -

This issue should have been fixed for the 1.5 release.

Show
Wil Sinclair added a comment - This issue should have been fixed for the 1.5 release.
Hide
Wil Sinclair added a comment -

Please categorize/fix as needed.

Show
Wil Sinclair added a comment - Please categorize/fix as needed.
Hide
Wil Sinclair added a comment -

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

Show
Wil Sinclair added a comment - This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Hide
Wil Sinclair added a comment -

Reassigning as Ralph is the maintainer of Zend_Db

Show
Wil Sinclair added a comment - Reassigning as Ralph is the maintainer of Zend_Db
Hide
Ralph Schindler added a comment -

Reviewed and on the radar.

Show
Ralph Schindler added a comment - Reviewed and on the radar.
Hide
Jordan Ryan Moore added a comment -

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

Show
Jordan Ryan Moore added a comment - This example should be something found on the php.net manual and doesn't actually have anything specifically to do with Zend Framework.
Hide
Simon added a comment -

"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.

Show
Simon added a comment - "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.

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
1d
Original Estimate - 1 day
Remaining:
1d
Remaining Estimate - 1 day
Logged:
Not Specified
Time Spent - Not Specified