Something along these lines perhaps:

Controller:

 

call this and it would set the retrieved data for the view for you.

$this->set('teachers', ClassRegistry::init('Teacher')->getTeachers($parms to 
get teachers if needed based on limit, conditions so forth, the Tutorsession 
id));

 

 

Teacher Model:

getTeachers()

would be a model function to get teachers based on any normal conditions, 
limit, id, so forth.

 

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of 
Andrew Barry
Sent: Saturday, May 24, 2014 3:32 AM
To: [email protected]
Subject: Re: load 2 models in controller

 

I need to know how this is done . ( My example was just that).
I just want to load another tables data in on the same view as another table 
data (just assume the data is not related).

 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to