This looks like a job for model associations.

http://book.cakephp.org/view/78/Associations-Linking-Models-Together

Basically set Parent to have many Entity (Or what every relationship
is the correct one for your case)

On Apr 6, 4:07 pm, Manisha <[email protected]> wrote:
> Hello All,
>
> Here is the Controller
>
> class userController extends AppController {
>
>    var $name='User';
>
> }//This is controller having model User
>
> and I have to make a join query between two models 1)parent 2)entitie
>
> for example:
>
> select * from tbl_parents a, tbl_entities b where a.parent_id =
> b.entity_id and b.entity_relationship='gallery' and a.deleted='no' and
> b.entity_id_1='49d7c6b5-7458-42b2-8d45-18830e7ba4d1' order by
> a.entity_id ASC
>
> I am running this query manually in userController
>
> Please give me some idea about how to make a join query in cakePHP
>
> Manisha.
--~--~---------~--~----~------------~-------~--~----~
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