Hi flocks,
I am also new to cakephp ..is there any mistake excuse, try like
this,

$campaign_store_dates = $this->CampaignStoreDate->find('all',
                                               array('joins' =>
array(array( 'table' => 'stores',
                                                           'alias' =>
's',
                                                           'type' =>
'left',
 
'foreignKey' => false,
 
'conditions'=> array('AND'=>array(
'CampaignStoreDate.campaign_id = s.store_id',
's.store_id=CampaignStoreDate.campaign_id'))));



On Jun 22, 12:23 pm, Jeremy Burns | Class Outfit
<[email protected]> wrote:
> Are you using the containable behaviour (highly recommended)? If so:
>
> $results = $this->CampaignStoreDate->find(
>         'all',
>         array(
>                 'contain' => array(
>                         'Campaign',
>                         'Store'
>                 ),
>                 'fields' => array(
>                         'Model.fieldname',
>                         etc...
>                 )
>         )
> );
>
> Jeremy Burns
> Class Outfit
>
> [email protected]http://www.classoutfit.com
>
> On 22 Jun 2010, at 08:07, rakeshyadav rakeshyadav wrote:
>
> > Hi all,
>
> >       Any body tell me the required cakephp query for below SQL query
>
> >       SELECT *
> > FROM campaign_store_dates cd, campaigns c, stores s
> > WHERE (
> > c.campaign_id = cd.campaign_id
> > AND s.store_id = cd.store_id
> > )
>
> > Thanks in advance,
> > Rakesh
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
> > athttp://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

Reply via email to