Fields should be an array I believe. So your entire query should be: $this->User->find('list', array('conditions' =>array ('Teachers.user_id' => $this->Auth->user('id')), 'fields'=>array ('Teachers.user_id')
On Mar 11, 2:36 pm, "Dave Maharaj :: WidePixels.com" <d...@widepixels.com> wrote: > Not sure what I am doing here. Been trying to no avail. > > What I am trying to do is find the id of the logged in user from TEACHERS > table WHERE the user_id is $this->Auth->user('id'); > > $conditions = array('Teachers.user_id'=>$userId); > $fields = 'Teachers.user_id'; > > $teacherID = $this->User->Teacher->find('list', compact('conditions', > 'fields')); > > Ideas on what I am doing wrong? > > 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---