 <p>try investigating this in steps first</p> <pre><code>SELECT * FROM Appts WHERE Appts.dr_id = 101 </code></pre> <p>if that returns 2 rows the data is ok in your appts table</p> <p>then add</p> <pre><code>SELECT a.patient_id ,p.* FROM Appts A LEFT JOIN Patients p ON Appts.patient_id = p.patients_user_id WHERE Appts.dr_id = 101 </code></pre> <p>if you see null values returned in p.* part, then there is something wrong with your join condition, you may be joining on a wrong field. or the patient record for corresponding patient_id is missing in the Patients table</p>