> But for some reason, only one record is printing that meets the criteria,
> but there are many more that should be.
there are a lot of errors
> Here is my code:
>
> tasks_controller.php
> function index() {
> $this->Task->recursive = 0;
> $this->set('tasks', $this->paginate());
> // code to pull the Completed status items
you declare allStatuses but you never use it
> $allStatuses= $this->Status->Task->find('all');
> $statuses = $this->Task->Status->find('all',
> array('conditions'=>array('Status.name'=>'Completed')));
> $this->set(compact('task','statuses'));
you compact() task, that it's not declared
> }
>
> ************************************************************************
>
> tasks - index.ctp
> <table>
here try to put a pr($statuses)..
> <?php foreach ($statuses as $status ): ?>
> <tr>
> <td><?php echo $status['Status']['name']; ?></td>
> <td><?php echo $task['Priority']['name']; ?></td>
> <td><?php echo $task['Task']['description']; ?></td>
> <td><?php echo $task['Task']['duration']; ?></td>
> <td><?php echo $task['Company']['name']; ?></td>
> <td><?php echo $task['Employee']['name']; ?></td>
> </tr>
> <?php endforeach; ?>
> </table>
>
--
pietro
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---