http://book.cakephp.org/view/474/Containable
should be able to help you On Aug 4, 5:21 am, Long <[email protected]> wrote: > Greetings! > > Help me please. > > I have 3 models: > > Job hasMany EquipSet > Equip hasMany EquipSet > > Job ---> EquipSet <--- Equip > > I need to make normal FIND() with associations, automagic, e.t.c. > > $query = > SELECT e.img > FROM equips e > WHERE e.id IN ( SELECT e.parent_id > FROM jobs j, equip_sets es, equips > e > WHERE j.id=es.job_id AND > e.id=es.equip_id AND j.id=1 > GROUP BY e.parent_id ); > > $this->Job->EquipSet->Equip->query($query) - it works good > > p.s. I am sorry for my English =/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
