how to call mysql stored procedure on zend framework?
any body may give an example?
thanks
how to call mysql stored procedure on zend framework?
any body may give an example?
thanks
See here:
How can I use a stored procedure in a MySql database with Zend Framework?
Bill has answered it.
Let the procedure be example:
CREATE PROCEDURE example ()
BEGIN
SELECT DISTINCT(licence) FROM applications WHERE `licence` > 0;
END
Then in your PHP code:
$db = Zend_Registry::get('db');
$stmt = $db->query("CALL sp_distinctlicence()");
$data = $stmt->fetchAll();
Zend_Debug::dump($data,$label=null, $echo=false);