Sunday, April 5, 2009

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"
<d...@widepixels.com> 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 cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: