On 8/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> This: doesn't work
> var $paginate = array('limit' => 10, 'conditions' => 'Post.approved =
> 1');
>
> function index() {
> $this->Top->recursive = 0;
> $this->set('tops', $this->paginate());
> }
>
It doesn't work because you have put the conditions in the wrong
place. Try the code below.
var $paginate = array('recursive' => 0, 'limit' => 10);
function index() {
$conditions = array('Post.approved' => 1);
$this->set('Top', $this->paginate($conditions));
}
--
Chris Hartjes
Senior Developer
Cake Development Corporation
My motto for 2007: "Just build it, damnit!"
@TheBallpark - http://www.littlehart.net/attheballpark
@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
-~----------~----~----~----~------~----~------~--~---