mySQL Stored Procedure "does not exist" |
CI v 3.1.10
I am trying to call a Stored Procedure without much success. I am getting an error message I have no problem calling the procedure from the mysql console in PHPStorm. My code and the error $stmt = "CALL spinup()"; $res = $db->query($stmt); print_r( $db->errorInfo()); // Array ( [0] => 42000 [1] => 1305 [2] => PROCEDURE archives.spinup does not exist ) The procedure is created like so.... DELIMITER ; DROP PROCEDURE IF EXISTS archives.spinup; DELIMITER // CREATE definer = admin@`%` PROCEDURE `archives`.`spinup`() BEGIN -- creating tables here.... SELECT "DONE"; END// DELIMITER I have searched high and low and can find no answer as to why the procedure is not being "found" since it absolute does exist.
Read this:
3 Easy Steps To Call Stored Procedure In Codeigniter What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
thanks ojmichael - tried this code and made no difference....this getting Procedure Does not exist error
(11-26-2020, 02:10 PM)InsiteFX Wrote: Read this:Good information When is use this method $stmt = "CALL spinup()"; $data = $this->db->query($stmt); $result = $data->result(); I get this error Call to a member function result() on boolean
Thanks for all the replies - problem was discovered by my colleague who is the CI admin. Turns out the PDO connection was pointing to a different instance of our RDS on AWS. Once I switch the target RDS it worked like a charm !
Both MySQL and MariaDB are showing the same error when the table doe's not exist.
Read: MySQL DROP PROCEDURE What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |