You've written "condition" where it should be "conditions"

On Dec 10, 8:47 am, jjh <[EMAIL PROTECTED]> wrote:
> I had to setup a find query inside my custom component but the find
> method doesn't seem to like my conditions array. Can anyone tell me
> what's wrong?
>
>    public function test($id) {
>       $userInstance = ClassRegistry::init('User');
>       $param = array(
>          'condition' => array("User.id"=>$id),
>          'recursive' => -1
>       );
>       $user = $userInstance->find('all',$param);
>       print_r($user);exit;
>    }
>
> The result is always the entire data set.
--~--~---------~--~----~------------~-------~--~----~
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