title: Multiple SQL JOIN statement
body: <p>I have to make a query from two table, so for example here is my table structure for "student" table:</p>
  
  <pre><code>-------------------------------------------
  id  |  Name  |  mom_job_id  |  dad_job_id
  -------------------------------------------
  1   | Test1  | 1            |  2
  2   | Test2  | 3            |  1
  -------------------------------------------
  </code></pre>
  
  <p>and I have "job" table like this :</p>
  
  <pre><code>---------------------------
  id  | job_name
  ---------------------------
  1   | designer
  2   | writer
  3   | programmer
  ---------------------------
  </code></pre>
  
  <p>I want to select a record on student table and replace "mom_job_id" and "dad_job_id" with job_name on "job table"</p>
  
  <p>I have tried this query :</p>
  
  <pre><code>SELECT student.id, job.job_name as mom_job, job.job_name as dad_job
  FROM student
  INNER JOIN job ON mom_job_id = job.id
  WHERE id=1
  </code></pre>
  
  <p>That query work fine, but dad's job is set to be same as mom's job, so I add another INNER JOIN and make the query like so :</p>
  
  <pre><code>SELECT student.id, job.job_name as mom_job, job.job_name as dad_job
  FROM student
  INNER JOIN job ON mom_job_id = job.id
  INNER JOIN job ON dad_job_id = job.id
  WHERE id=1
  </code></pre>
  
  <p>The query is work but not returned any record. So how do I solve this? I belive the problem came from the job.id</p>