Sorry, I forget that I used this solution but could not succeed

$brands = $this->User->Product->Brand->find('all',array(
                                                      'fields' =>
array('Brand.id','Brand.brand_name'),
                                               'conditions' =>
array('User.id' => $this->Auth->user('id')),
                                                      'recersive' => 0)
                                           );

Please help me

On Oct 16, 12:15 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I have three Model with following association
> 1 User
> 2 Product
> 3 Brand
>
> User ------------HABTM (brands_users)----------Brand
> Brand-----------HABTM (brands_products)----------Product
> User-----------HABTM (products_users)----------Product
>
> I want to find a list of all brands which product had been selected by
> a user.
>
> Means first user select some products then he will be select brands.
>
> So I am unable to display all brands accordingly user's products
>
> Thanks a lot you for my help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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