[eluser]naftolir[/eluser]
Hi all,
I am a newbie to CI. I just started using it for a project.
I seem to be having a problem loading more than three models within the same function.
Example code:
public function add() {
$data['fields'] = $this->orders_model->getMappedFields();
$this->load->model('clients_model');
$data['clients'] = $this->clients_model->getAllByName();
$this->load->model('status_model');
$data['status'] = $this->status_model->getAll();
$this->load->model('items_model');
$data['itemFields'] = $this->items_model->getMappedFields();
$data['items'] = $this->items_model->getAllToView();
$this->load->model('order_items_model');
$data['orderItemFields'] = $this->order_items->getMappedFields();
$this->load->view('orders/add', $data);
}
This is in one of my controllers.
When I go to the view page I get this error:
"A PHP Error was encountered
Severity: Notice
Message: Undefined property: Orders::$order_items
Filename: controllers/orders.php
Line Number: 24"
I only get this error after loading three models, if I take away one loaded model in the function, it works fine.
Any help will be greatly appreciated.
This project is being hosted on godaddy.
thanks,
naftoli rapoport