I really need to do that query by hand. I will paginate by myself and
when get the job done will find some way to make it nice (i hate when
my code sucks but need to get it done now).

Many thanks, (not really what i was looking for, but very enlightning)
and excuse my poor english.

On May 26, 4:14 pm, jonern <[EMAIL PROTECTED]> wrote:
> //setscustomparameters:post.category = 1:
> $conditions = array('Post.category' => 1);
> //gets the category from search:
> $category = $this->params['pass']['category'];
>
> $paginationParameters = array();
> $paginationParameters['controller'] = 'posts';
> $paginationParameters['action'] = $this->action;
> $paginationParameters['category'] = $category;
>
> $this->paginate['Post'] = array(
> 'limit' => 1,
> 'order' => array ('Post.id' => 'desc'),
> 'url' => array ('url' => $paginationParameters)
> );
>
> $records = $this->paginate('Post', $conditions);
>
> Here we create a paginate function withcustomparameters and
> paginationParameters!
> This is working fine in my app...
>
> Check out the example from Mariano Iglesias for more 
> details:http://groups.google.com/group/cake-php/browse_thread/thread/f990a459...
>
> A big thanks to Nate, Mariano Iglesias, AD7six, Chris Hartjes and
> PhpNut for all the great answers here in google-groups!
> You have helped me a lot in my Cake baking process, and you make the
> Cake grow even bigger =) Thanks!
>
> On May 26, 4:21 pm, dardosordi <[EMAIL PROTECTED]> wrote:
>
> > is there any way i can use $this->paginate() with acustomquery?
>
> > I'm doing a double join and filtering the results and need to paginate
> > my results. Hope somebody could help me with this. Ask me if you need
> > more details about my models, etc.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to