Welcome Guest, Not a member yet? Register   Sign In
Commands out of sync
#1

I am calling two models in a controller function. And in these two model I am calling two Procedures to get the data from the database. But I am getting the error in the controller.

"Commands out of sync; you can't run this command now"

My code is like below

This is my controller code

  $this->load->model('model_get_fixed_data');
           $degrees=$this->model_get_fixed_data->get_degree_dropdown();
 $this->load->model('model_users');
           $doctor_data=$this->model_users->get_doctor_details_by_id($this->session->userdata('doctor_id'));


This is my model code

 function get_degree_dropdown(){
       $query= $this->db->query("call getDegree_master()");
       return $query->result();
   }

public function get_doctor_details_by_id($doctor_id)
   {
       $query= $this->db->query('call get_DoctorDetaisById('.$doctor_id.')');
       return $query->result();
   }

If anyone have faced this kind of problem. Please help me.

Thnks & regards
Reply


Messages In This Thread
Commands out of sync - by debajyoti.saha09 - 01-14-2015, 12:46 AM
RE: Commands out of sync - by Rufnex - 01-14-2015, 02:32 AM
RE: Commands out of sync - by skunkbad - 01-15-2015, 02:21 AM
RE: Commands out of sync - by mehmood sanjrani - 03-01-2016, 11:21 AM
RE: Commands out of sync - by meSmashsta - 01-08-2017, 11:40 PM
RE: Commands out of sync - by dimas - 03-21-2017, 04:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB