You can use $this->db->query("call my_stored_proc('arg1','arg2');") .
If you have parameters, you should wrap them in a transaction as follows:
$this->load->database(); $this->db->trans_start(); $success = $this->db->query("call my_stored_proc('arg1','arg2',@out_param);"); $out_param_query = $this->db->query('select @out_param as out_param;'); $this->db->trans_complete(); $out_param_row = $this->db->row(); $out_param_val = $this->out_param;
source share