How can I use a stored procedure in a mysql database with zend framework?
Answer Posted / Shalabh Bhatia
To use a stored procedure in Zend Framework, you can utilize the Zend_Db_Adapter class. First, create a new instance of your database adapter, then call the `quoteIdentifier` method to escape the stored procedure name, and finally execute it using the `query` method. Here's an example:
```php
$db = $this->getServiceLocator()->get('ZendDbAdapterAdapter');
$stmt = $db->query("CALL " . $db->quoteIdentifier($procedure));
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers