Thanks man!I got it working. I have a nother problem now. The equipment table has 2 foreign keys - ---- owner and incharge I would like to display a table having the equipment owned by the user and a table showing the equipment the user is in charge of. The owner part im able to do,its the incharge part im stuck.
On May 29, 10:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > you'll probably have an array like > use the 'Equipment' key instead of 'User' key > you probably have something like > $user['User']['id'] > for getting the user id > > to get equipment type use > $user['Equipment']['type'] > > you probably have to do each of those manually inside of the table > > On May 28, 10:07 pm, hashkash <[EMAIL PROTECTED]> wrote: > > > Here is the array I obtain after a findByUsername(). > > $recursive=1, foreign key for equipment is owner i.e i wopuld like to > > see only the owners equipment. > > I want to print the Equipment part in the form of a table.Im unable to > > figure out how. > > Hoping for some help! > > Thanks! > > > Array > > ( > > [User] => Array > > ( > > [id] => 1 > > [username] => hashkash > > [password] => 7d7982cc30b26508c71c10836ec12840 > > [email] => [EMAIL PROTECTED] > > [first_name] => Kashyap > > [last_name] => Thimmaraju > > [last_login] => 2007-05-29 04:18:36 > > [owner] => 1 > > [incharge] => 1 > > ) > > > [Equipment] => Array > > ( > > [0] => Array > > ( > > [eqno] => 1234 > > [slno] => > > [description] => > > [specification] => > > [owner] => hashkash > > [incharge] => kashyap > > [type] => computer > > [dop] => 2007-05-22 09:38:32 > > [dow] => 0000-00-00 00:00:00 > > [w_incharge] => > > [w_phone] => 0 > > [w_addr] => > > ) > > > [1] => Array > > ( > > [eqno] => 98765 > > [slno] => 12387 > > [description] => lfjksd > > [specification] => uiofs > > [owner] => hashkash > > [incharge] => preeti > > [type] => comp > > [dop] => 2005-11-15 11:14:00 > > [dow] => 2006-01-17 14:15:00 > > [w_incharge] => murajkldf > > [w_phone] => 1237843 > > [w_addr] => jklfdsnmvcl > > ) > > > ) > > > ) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
