In Cake 1.2, instead of using
$this->User->findAll( $conditions );
you can just use
$this->paginate( $conditions );
Bake a sample app to see how the default setup works - it uses the
paginator helper in the views for the links etc.
If you are using Cake 1.1, then you just need to manage the $page
parameter of findAll yourself. I can't even remember if you can have
named url arguments in Cake 1.1, but if so that would be the way to do
it (just have the appropriate "page:X" in each of the pagination links
in your view, and look for this value in your controller action).
On Nov 7, 4:57 am, puatki <[EMAIL PROTECTED]> wrote:
> Hello ( and sorry for my english ).
>
> I have working findAll rule :
>
> $this->User->bindModel(array('hasOne'=>array('Dummy'=>array('className'=>'Stat','foreignKey'=>'user_id'))),false);
>
> $this->data = $this->User->findAll('Dummy.code = User.code AND Dummy.s
> = 1 GROUP BY User`.`id`',array('id','username','code','SUM(cash) as
> suma, COUNT(User.id) AS click'),$order, $limit, $page,0);
>
> How can I paginate this data set ?
> Help me, please ;)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---