$storeDivisions = $this->Store->find('all',
array('joins' => array(
array('table' => 'divisions',
'alias' => 'd',
'type' => 'left',
'foreignKey' => false,
'conditions'=>
array('Store.division_id = d.division_id')
)
),
'conditions'=>array('d.country_id'=>1),
'order'=>array('Store.store_name ASC')
));
On Wed, May 19, 2010 at 9:18 AM, Jeremy Burns <[email protected]> wrote:
> I would start by reading this part of the online
> guide<http://book.cakephp.org/view/1000/Models>.
> Setting up models is key to just about everything you do in Cake, so simply
> finding out how to join two tables will only move you on to your next
> problem.
>
>
> Jeremy Burns
> [email protected]
>
>
> On 18 May 2010, at 12:29, cakephpBbsr wrote:
>
> Hello Team,
>
> I want to join two tables in controller using find().Can u provide me
> some sample code.
>
> Thanks
> Rasmi
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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
>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> 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]<cake-php%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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