by saying $this->Post->findAll() you are asking the model to findAll
and tell the result to the controller so it can pass it to the view
(or do something to/with it first) which is what the $this->set() part
does

Sam D

On 5/8/06, calzone <[EMAIL PROTECTED]> wrote:
>
> As I review the manual more, I feel this question is becoming still
> more pressing.
>
> The chapter on models specifically calls out the use of findAll() as a
> means of populating the recordset for the view.
>
> But again, the Blog tutorial, findAll() is used in the controller, not
> the model:
>
>     function index()
>     {
>         $this->set('posts', $this->Post->findAll());
>     }
>
> Why?  Does it matter? Is there any difference? Pros or cons of one way
> over another?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to