0

I have error is : Commands out of sync; you can't run this command now

i think there is something that should be included but i don't know what.. please help me...

public function index()
{
    $srcProduct = $this->dbAll->showProduct('','');
    $kategori = $this->dbAll->kategori();

    $this->output_data['listProduct'] = $srcProduct;
    $this->output_data['listCategory'] = $kategori;

    $this->load->view('home',$this->output_data);
}
  • `dbAll` is single model???yes you can run 2 models and call their functions seperately.... – Abbas Dec 08 '15 at 08:42
  • @goudaElalfy Commands out of sync; you can't run this command now – Fakhryan Albar Dec 08 '15 at 09:01
  • @abbas ohh... isee.. but how to throw 2 model in 1 view, sorry i am beginner in CI. certainly always wrong in making MVC. I must throw to index page – Fakhryan Albar Dec 08 '15 at 09:03
  • simply `$this->load->model('model1')` and `$this->load->model('model2')` and call functions like `$this->model1->func_name()` and `$this->model2->func_name()` – Abbas Dec 08 '15 at 09:07

0 Answers0