Welcome Guest, Not a member yet? Register   Sign In
load model multiple times?
#1

[eluser]zoran119[/eluser]
hi everyone,

i don't know much about ci, so i ran into the following problem. i have a model called 'subject' and a model called 'assessment'. now, a subject can have more than one assessment... but i don't know how to load the assessment model multiple times. what i would normal do is something like this (pseudo code):

$assessment_1 = new Assessment(1);
$assessment_2 = new Assessment(2);

where the assessment constructor takes the assessment id and fetches the data from the database into the instance. so then, i can access the methods from the assessment object. for example:

$assessment_1->set_complete();
$assessment_2->delete();

now, when it comes to ci, i have no idea on how to model this subject-assessment relationship.


any help will be appreciated.


Messages In This Thread
load model multiple times? - by El Forum - 01-18-2011, 05:21 AM
load model multiple times? - by El Forum - 01-18-2011, 10:54 AM
load model multiple times? - by El Forum - 01-19-2011, 01:34 AM
load model multiple times? - by El Forum - 01-19-2011, 02:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB