call load method from a model

#2
[eluser]CroNiX[/eluser]
Do you have to do it from the model? It should really be done in the controller.
Code:
$this->load->model('user_model');
$this->load->model('account_model');

// get current user
$user = $this->user_model->get_user_data();

// get account data for current user by passing ID from previous model method.
$accounts = $this->account_model->get_user_account($user['id']);


Messages In This Thread
call load method from a model - by El Forum - 02-07-2012, 12:20 PM
call load method from a model - by El Forum - 02-07-2012, 12:48 PM
call load method from a model - by El Forum - 02-07-2012, 01:00 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.