Welcome Guest, Not a member yet? Register   Sign In
Calling a model from another model?
#13

[eluser]mattalexx[/eluser]
Thanks for the good discussion. I see now that there is absolutely no best practice when it comes to underscores; that it's just personal preference. Anyway, back to the original purpose of this post (accessing a model from another model) ...

I'm using the following code and loading the model using this (it seems to work):
Code:
$this->load->model('item_image_model');
print class_exists("Item_image_model")? "loaded" : "not loaded"; // loaded
So I access methods this way:
Code:
$select = Item_image_model::get_select();
Using this syntax isn't mentioned in the docs to the best of my knowledge, so I wanted to run it by you and see if there is a better way to do it.


Messages In This Thread
Calling a model from another model? - by El Forum - 06-22-2008, 07:12 PM
Calling a model from another model? - by El Forum - 06-22-2008, 08:31 PM
Calling a model from another model? - by El Forum - 06-22-2008, 08:35 PM
Calling a model from another model? - by El Forum - 06-22-2008, 09:21 PM
Calling a model from another model? - by El Forum - 06-22-2008, 11:28 PM
Calling a model from another model? - by El Forum - 06-22-2008, 11:36 PM
Calling a model from another model? - by El Forum - 06-23-2008, 04:15 AM
Calling a model from another model? - by El Forum - 06-23-2008, 04:36 AM
Calling a model from another model? - by El Forum - 06-23-2008, 10:26 AM
Calling a model from another model? - by El Forum - 06-23-2008, 11:49 AM
Calling a model from another model? - by El Forum - 06-23-2008, 12:02 PM
Calling a model from another model? - by El Forum - 06-23-2008, 12:42 PM
Calling a model from another model? - by El Forum - 06-28-2008, 12:35 PM
Calling a model from another model? - by El Forum - 06-28-2008, 02:26 PM
Calling a model from another model? - by El Forum - 06-28-2008, 03:20 PM
Calling a model from another model? - by El Forum - 06-28-2008, 04:25 PM
Calling a model from another model? - by El Forum - 06-28-2008, 06:27 PM
Calling a model from another model? - by El Forum - 06-28-2008, 07:24 PM
Calling a model from another model? - by El Forum - 06-29-2008, 10:57 AM
Calling a model from another model? - by El Forum - 06-29-2008, 12:01 PM
Calling a model from another model? - by El Forum - 10-30-2008, 02:46 PM
Calling a model from another model? - by El Forum - 10-30-2008, 03:08 PM
Calling a model from another model? - by El Forum - 10-30-2008, 04:10 PM
Calling a model from another model? - by El Forum - 10-30-2008, 06:51 PM
Calling a model from another model? - by El Forum - 10-31-2008, 12:45 PM
Calling a model from another model? - by El Forum - 10-31-2008, 12:58 PM
Calling a model from another model? - by El Forum - 12-16-2009, 05:18 AM
Calling a model from another model? - by El Forum - 12-16-2009, 05:52 AM
Calling a model from another model? - by El Forum - 12-16-2009, 06:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB