title: How to join 2 tables and show all first table even second table where clause not met?
body: <p>I want to make simple school attendance/presence, the idea is teacher should decide presence status of student every day.</p>
  
  <p>I have 2 table, student and presence</p>
  
  <p>Here is student table</p>
  
  <p><a href="https://i.stack.imgur.com/qhxFx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qhxFx.png" alt="enter image description here"></a></p>
  
  <p>Here is presence table</p>
  
  <p><a href="https://i.stack.imgur.com/bNOAX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bNOAX.png" alt="enter image description here"></a></p>
  
  <p>Now I want to make interface in my website which show all student by class_name, and date_presence.</p>
  
  <p>If all student in class and current date doesn't have presence status, then it show all student with presence status "Not yet decide"</p>
  
  <p>If some student in class and current date doesn't have presence status, then it show student presence status A/I/S for student which already have presence status set, and the other student as "Not Yet Decide"</p>
  
  <p>So here is my query</p>
  
  <pre><code>SELECT `a`.`student_id`, `a`.`student_name`, `b`.`presence_id`, `b`.`presence_status`, `b`.`date_presence` 
  FROM `student` `a` 
  left JOIN `presence` `b` ON `a`.`student_id` = `b`.`student_id` 
  WHERE `a`.`class_name` = 'KLJ0009' and `b`.`date_presence` = '2018-07-24'
  </code></pre>
  
  <p>and here is the result</p>
  
  <p><a href="https://i.stack.imgur.com/slcfU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/slcfU.png" alt="enter image description here"></a></p>
  
  <p>It show only 3 people, what I want is show all the student which class_name is KLJ0009 and if student doesn't have presence_status just show presence_id, presence_status, and date_presence as null</p>
  
  <p>How I can do that?</p>
  
  <p>Thanks in advance.</p>