I am creating an Online Attendance System, and my problem is around a query below not bringing back the correct data.
I am looking to bring back a Student ID, Class ID and the Attendance Status E.G Present Late or Absent of that class.
If attendance has been taken, then the query run's fine. However, if no attendance has been taken the query returns an empty set.
I am looking to still return all the data but have 'null' or anything in the 'Attendance Status' column, If attendance hasn't been taken.
This is the query:
And it bring back these results if attendance has been taken for the class:
However, If attendance hasn't been taken, then it will just return an empty set. What I would like is for in the attendance column it print 'null' or anything to make sure some data still comes back.
At minimum I still need the Class and Student ID. I think it may need a JOIN, I just can't get my head around it.