Use the 'fields' options for your field and add 'User.name' in it
maybe ?

hth

On Mar 31, 3:28 pm, joshua <josh...@gmail.com> wrote:
> For example:
> One task has many users.
> ########################
>         $condition = array();
>         $condition['joins'] = array(
>             array(
>                 'table' => 'users',
>                 'alias' => 'User',
>                 'type' => 'inner',
>                 'foreignKey' => 'user_id',
>                 'conditions'=> array('User.id =
> Task.user_id','User.deleted=0')
>         ));
> ########################
> I just want to find the user name , not all the fields in User table. I try
> to add the 'fields' property in this array, but it seems not.
> --
> Thanks
> Joshua
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to