Welcome Guest, Not a member yet? Register   Sign In
Can a model use another model?
#2

[eluser]Colin Williams[/eluser]
Because the model has not been previously loaded, it's not yet a part of the CI object, so it is never copied to your current model. You'll need to go through the CI object to do so

Code:
$ci =& get_instance();
$ci->load->model('other_model');
$ci->other_model->call_method();


Messages In This Thread
Can a model use another model? - by El Forum - 01-13-2010, 04:15 PM
Can a model use another model? - by El Forum - 01-13-2010, 04:22 PM
Can a model use another model? - by El Forum - 01-13-2010, 07:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB