CodeIgniter: mySQL and Stored Procedures  I gave myself a
challenge. Creating a Stored Procedure in mySQL and calling it
via CodeIgniter. This is PHP/mySQL based. It was an education.
I got this solution from CodeIgniter forums across several
posts. I’m posting them all in one post here.  Your typical
Stored Procedure call could be   CREATE PROCEDURE
`lab101db`.`sp_GetEmployees` ()     SELECT * FROM dt_employees
ORDER BY Surname;  You need to change your database driver. The
standard mySQL driver used in CodeIgniter does not work. You
need mySQLI. Open up your CodeIgniter directory and go to the
database file at the following path   On line 44, add mysqli to
the following line  $db[‘default’][‘dbdriver’] = “mysqli”;  Save
the above. Then add the function, below, to your Model class
e.g. EmployeeModel.  function getEmployees() {         $sql =
“CALL sp_GetEmployees”;         $parameters = array();        
$query = $this->db->query($sql, $parameters);          return
$query->result();  In your Controller, add