I do not know if I was right, also if I am right saying that a
"survey" is basically "questions" .. So maybe a only one model and one
controller could handle a survey ?

On Jan 8, 8:19 pm, Robby Anderson <[EMAIL PROTECTED]> wrote:
> Well, francky had it right. I just riffed on that. :)
>
> I think it should be as simple as added your Survey model the $uses
> property in the controller declaration.
>
>     var $uses = array('Questions','Survey');
>
> Then use it in the controller as necessary:
>
>     $this->Survey->doSomething();
>
> Alternately, you could load the Survey model only in the methods you
> need it, and instantiate it yourself.
>
>     App::import('Model', 'Survey');
>
>     $survey = new Survey();
>     $survey->doSomething();
>
> On Jan 8, 1:11 pm, chrisdNH <[EMAIL PROTECTED]> wrote:
>
> > Robby, you are exactly right. :-) I needed to step back and look at
> > how I designed the controllers. I've combined them  - I now have the
> > save() functionality in the Questions controller. But now I'm trying
> > to save to the Surveys table from the Questions controller. Can I use
> > var $useTable = 'surveys' in the controller? Thanks again, I
> > appreciate the guidance.
>
> > -Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to