I surprised that find call fetches any data as you have your contain
criteria mixed in with your conditions array.

It should be something like:

$this->User->find('all', array(
  'conditions' => array('User.id' => $user_id),
  'contain' => array(
    'Event' => array(
      'Eventtype' => array(
        'fields' => array('Eventtype.id','Eventtype.eventName')
      )
    )
  )
));

Are you sure you have named your models right too? as Eventtype should
really be EventType if sticking with CakePHP conventions, which is
advisable.  In fact I would imagine it to ideally be EventsType (table
events_types) as it sounds as though it should be a join table
(HABTM).

Also you do not need to specify the = sign in find conditions as cake
defaults to 'field = value' on all finds.
--~--~---------~--~----~------------~-------~--~----~
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