[eluser]dexcell[/eluser]
hello, i would like to ask if my approach of writing is correct.
i have 2 models, let's name it entries_model and groups_model
entries_model do the low handling to entries table.
groups_model do the low handling to group table.
then in one of functions of entries model, it needs to connect to group table to check something,
the question:
should i write (connecting to group table manually) in one of entries_model function? or should i just load group_model and call the method?
for illustration (if i load the group_model, it works tough i don't know if it's correct way since i'm new to CI):
Code:
class Entries_model extends Model
{
function Entries_model()
{
parent::Model();
$this->load->model('groups_model');
}
function checkSomething()
{
$this->groups_model->checkSomething(1);
}
}