title: How to convert SQL to cakephp query to query from controller
body: <p>This is my SQL query that needs to be converted to cakephp type:</p>
  
  <pre><code>select `name` 
  from `exams` 
  left outer join `exam_results` on `exams`.id = `exam_results`.exam_id 
  where `exam_results`.student_id = $sid
  </code></pre>
  
  <p>So how do I put it in controller and use find () etc. to query database.?</p>