Let me tell you my dilemma:

I can't use the $this->paginate in the Model, probably because that's
a controller only method, but is there a way to set up the same
functionality (being able to pass in controller/action/page:1 and have
it paginate the results from a find('all') ???

Right now I have a simple find('all') in my model, which I put there
so it can be used in many instances to gather the results, so I don't
keep writing the same thing over (D.R.Y.) :)


        function getCurrentShows($limit)
        {
                return $this->find('all', array('conditions'=>array
('Show.archived'=>'0', 'Show.active'=>'1'),'limit'=>$limit,
'order'=>'startDate ASC'));
        }

Can someone help me figure out how to include Cake's pagination with
this, or another method, so it's still D.R.Y. yet usable through the
app???
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to