On Mon, Jul 6, 2009 at 9:06 PM, keanoppy<[email protected]> wrote:
>
> all index from the stages table, the output for $stage['Phase']['id']
> can be shown

If you're getting an "undefined index" error, what is the next word in
the error message? It should tell you which index is undefined.


> 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 part of the controller code that's relevant to this view. Post the
code you have that includes the find() call (or paginate() or however
you're querying the DB).

> 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

I meant the output of debug($stages), literally, not the debug message
from the error you're seeing. Put this line at the very top of your
view file:

debug($stages);

Alternatively, put this in the controller, right after your find() call:

die(debug($stages));

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