Well, I'm no expert, but this line stinks:

 $this->set('day', $this->Day->read(null, $id), $this->paginate
('Birthday'));

as you can see in the API[1] and The Book[2], Controller::set()
accepts only two params..

[1]: http://api.cakephp.org/class/controller#method-Controllerset
[2]: http://book.cakephp.org/view/427/set

Try fixing that and we'll see what's the next step :-)

On Apr 14, 12:42 am, Cody Sortore <[email protected]> wrote:
> Okay, so I'm working on creating a website where one of the things
> people can do is add their birthdays, each day of the year is listed,
> and peoples birthdays are listed inside of the views for the days as
> "related birthdays" with standard bake format.  Been trying forever to
> figure out what I need to do to get only the birthdays to show that
> I've approved though.  This is the latest attempt of mine... which
> seems like it should work?  but obviously does not... or else I
> wouldn't be on here now.  Thanks in advance for any help you guys can
> offer!  This group has been a great help to me in the past.
>
> <?php
> class DaysController extends AppController {
>
>         var $name = 'Days';
>         var $helpers = array('Html', 'Form');
>         var $paginate = array('Day' => array('limit'=>31), 'Birthday'
> => array
> ('conditions' => array('Birthday.approve' => 1)));
>
>         function index() {
>                 $this->Day->recursive = 0;
>                 $this->set('days', $this->paginate('Day'));
>         }
>
>         function view($id = null) {
>                 if (!$id) {
>                         $this->Session->setFlash(__('Invalid Day.',
> true));
>                         $this->redirect(array('action'=>'index'));
>                 }
>                 $this->set('day', $this->Day->read(null, $id), $this->paginate
>
> ('Birthday'));
>         }
>
> }
>
> ?>
--~--~---------~--~----~------------~-------~--~----~
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