Try this

var $paginate = array(
        'Post' => array (
                'limit' => 3,
                'order' => array(
                        'Post.id' => 'asc'
                )
        )
);

On Sun, Aug 9, 2009 at 7:41 PM, valuba<[email protected]> wrote:
>
> I think I'm making some obvious faults in my attempt to create
> pagination. I followed the blog tut on cakePHP
> without any problems and decided to follow the pagination examples
> (http://book.cakephp.org/view/164/Pagination) as well.
>
> So my posts_controller.php looks like this:
>
>  <?php class PostsController extends AppController {
>      var $name = 'Posts';
>
>      var $paginate = array(
>      'Post' => array ('limit' => 3,
>        'Post.id' => 'asc')
>
>      );
>
>       function index()
>       {
>  // the error must be somewhere here
>                $data = $this->paginate('Post');
>                $this->set('data', $data);
>
>
>         }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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