I have three different tables.
- Users
- UserBids
- Company
Now I am retrieving data from User. Each User has many UserBids. Each UserBids BelongsTo Any Company.
Now I am writing a Query Like That.
$Users = $this->Users->find('all', array(
'conditions' => array('Users.id' => $userid)
));
It is getting all the data regarding to User and UserBids.
But in UserBids Table, there is field and its name is company_id.
How can I get company name and other data by that company_id from Company Table?