You have another table/model named ranks/Rank? Just use containable and grab it from $result['Rank']['name'] (or whatever the field is).
Although, your users table should have a field rank_id, not rank, if this is the case. On Sat, Apr 4, 2009 at 10:59 PM, Dave Maharaj :: WidePixels.com <[email protected]> wrote: > > How can I get the value of a field in a query result rather than the ID? > > I debug the variable : > [User] => Array > ( > [id] => 3 > [group_id] => 3 > [username] => dave > [rank] => 1 > ) > > where rank => 1 i need the value of 1 which is Average | Fair | Poor not the > id of 1 > > Thanks, > > Dave > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
