all index from the stages table, the output for $stage['Phase']['id']
can be shown
for the table stages,i have:
id(pk),phase_id(fk),status,duration,stagesname_id
(fk),p_date,a_date,remarks,created,modified
which part of the controller code?

the output from debug:
include - APP\views\stages\index.ctp, line 31
View::_render() - CORE\cake\libs\view\view.php, line 662
View::render() - CORE\cake\libs\view\view.php, line 376
Controller::render() - CORE\cake\libs\controller\controller.php, line
799
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 230
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
[main] - APP\webroot\index.php, line 88

On Jul 7, 8:51 am, brian <[email protected]> wrote:
> Which index? What is the table definition? What is the controller
> code? What is the output from debug($stages)?
>
> On Mon, Jul 6, 2009 at 8:35 PM, keanoppy<[email protected]> wrote:
>
> > want to ask,i have table stages
> > but seems that for this particular page,the index cannot be undefined
> > other than the table and view,where else should i check?
> > this is the code fragment of the table:
> > the entire php echo for $stage got error
>
> > <?php
> > $i = 0;
> > foreach ($stages as $stage):
> >        $class = null;
> >        if ($i++ % 2 == 0) {
> >                $class = ' class="altrow"';
> >        }
> > ?>
> >        <tr<?php echo $class;?>>
> >                <td>
> >                        <?php echo $stage['Stage']['id']; ?>
> >                </td>
> >                <td>
> >                        <?php echo $html->link($stage['Phase']['id'], 
> > array('controller'=>
> > 'phases', 'action'=>'view', $stage['Phase']['id'])); ?>
> >                </td>
> >                <td>
> >                        <?php echo $stage['Stage']['status']; ?>
> >                </td>
> >                <td>
> >                        <?php echo $stage['Stage']['duration']; ?>
> >                </td>
> >                <td>
> >                        <?php echo $html->link($stage['Stagesname']['name'], 
> > array
> > ('controller'=> 'stagesnames', 'action'=>'view', $stage['Stagesname']
> > ['id'])); ?>
> >                </td>
> >                <td>
> >                        <?php echo $stage['Stage']['date']; ?>
> >                </td>
> >                <td>
> >                        <?php echo $stage['Stage']['created']; ?>
> >                </td>
> >                <td>
> >                        <?php echo $stage['Stage']['modified']; ?>
> >                </td>
> >                <td class="actions">
> >                        <?php echo $html->link(__('View', true), 
> > array('action'=>'view',
> > $stage['Stage']['id'])); ?>
> >                        <?php echo $html->link(__('Edit', true), 
> > array('action'=>'edit',
> > $stage['Stage']['id'])); ?>
> >                        <?php echo $html->link(__('Delete', true), array
> > ('action'=>'delete', $stage['Stage']['id']), null, sprintf(__('Are you
> > sure you want to delete # %s?', true), $stage['Stage']['id'])); ?>
> >                </td>
> >        </tr>
> > <?php endforeach; ?>
> > </table>
--~--~---------~--~----~------------~-------~--~----~
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