Steps To Call Stored Procedure In Codeigniter:
The way you call a stored procedure can depend on how you create it. It’s time to discuss three common ways to create and call a stored procedure in CodeIgniter.
1. Create a stored procedure for select operation.
CREATE PROCEDURE Select_first ()
SELECT * FROM table_name;
Now that the Select_first procedure has been created and defined, we can call this procedure at any time in CodeIgniter. In this example, we create a variable, $data, by pointing to the procedure above after loading and initializing the database class in CodeIgniter.
To call this specific procedure within a query:-
$data = $this->db->query(“CALL Select_first ()”);
$result = $data->result();
Continue reading “Stored procedure in codeigniter”