Thanks for the info from everyone.

I did hard code it in the end since the rank options will not change, took
it out of the table all together.

Dave

-----Original Message-----
From: Walther [mailto:[email protected]] 
Sent: April-05-09 5:50 PM
To: CakePHP
Subject: Re: Get value no ID from query


If you have a hard coded set of ranks which will not change and you don't
want to use a another table/model then just make an array with the various
rank words and use the rank value as the key for each rank.

On Apr 5, 4:59 am, "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
-~----------~----~----~----~------~----~------~--~---

Reply via email to