title: cake php custom query
body: <p>I have use custom query in cakephp but I dont understand how to run custom join query.
  I am using this code</p>
  
  <pre><code>$arrayTemp1 = $this-&gt;User-&gt;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-&gt;request-&gt;data['User']['animal'].' ');
  </code></pre>
  
  <p><code>User</code> is the model for <code>ht_users</code> and <code>UserAnimalPrice</code> is the model for <code>ht_user_animal_prices</code>. How to combine the query?</p>
  
  <p>Please help.</p>