Reputation: 4392
In my Zend-Framework project, I want to execute a MySQL Procedure
that perform some complex search operation's.
But I don't have any idea about HOW to call or create PROCEDURE'S
, if requires.
Please suggest some code.....
Thanks In Advance.
Upvotes: 2
Views: 2082
Reputation: 4351
You can do it similar to how you prepare/bind normal SELECT/INSERT queries
$stmt = $db->prepare('CALL procedure(:param1, :param2)');
$stmt->bindValue(':param1', 0);
$stmt->bindValue(':param2', 1000);
$stmt->execute();
$rows = $stmt->fetchAll();
Upvotes: 5