I have use custom query in cakephp but I dont understand how to run custom join query. I am using this code
$arrayTemp1 = $this->User->query('SELECT DISTINCT
u.id,u.hunting_association FROM ht_users as u LEFT JOIN
`ht_user_animal_prices` as uap ON uap.user_id=u.id WHERE
uap.animal_type_id='.$this->request->data['User']['animal'].' ');
User
is the model for ht_users
and UserAnimalPrice
is the model for ht_user_animal_prices
. How to combine the query?
Please help.