On Mon, Feb 20, 2012 at 6:29 PM, Blues Clues <bluesclu...@gmail.com> wrote:
> I have read these and tried a couple ways already. The difference here
> is that city_id,secretquestion_id are part of my main table and my
> controller is on the main table. Where as in that material, user_id
> (of the main table) is part of the secondary info table (so user_id is
> foreign key).
>
> That's where my $this->user->find() is failing to retrieve the data
> from secondary table.

The fields for the related models will be under the model name in the
data array. Try debugging like this:

$data = $this->User->find(...)

die(debug($data));

If you don't see arrays for City and SecretQuestion then play with the
'recursive' option or use Containable.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to