I suppose your model is Game, and your action is"score":

function score()
{
        $pageparam = array('controller' => 'Games',
                           'action'     => $this->action);

        $this->paginate['Game'] = array('fields' => array('DISTINCT
week'),
                                            'limit'  => 10,
                                            'order'  =>
array('Game.week' => 'ASC'),
                                            'url'    => array('url' =>
$pageparam));

        $cond = null

        /* optionnaly you can set the cond ie : $cond =
array('league_id' => $id) */
        $this->set('games', $this->paginate('Game', $cond))
}

There is not warranty that will work, and it might contain some
typo :-)
On Jan 8, 7:45 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Jan 8, 2008 1:41 PM, francky06l <[EMAIL PROTECTED]> wrote:
>
>
>
> > Well, without much thinking I would say that your "series" are given
> > by a SELECT DISTINCT WEEK ORDER by WEEK ASC in your db, then
> > pagination is quite straight forward (I will try to write some code
> > sample, if you wish).
> > If you use a row per serie, then adding an ajax call triggered by
> > "click" on the <tr>, could populate a lower div with the game of this
> > week..
>
> A small code sample would be great.  All the Ajax stuff I can handle
> myself I think.  My problem was figuring out how to get the pagination
> helper to do the type of query you mention.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~---------~--~----~------------~-------~--~----~
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