0

I have 4 tables for student attendance.

  1. Students (sid, name, regno)
  2. classes (classid, startdate, enddate)
  3. Student to Classes (sid, classid)
  4. class attendance (classid, sid, attendance, date)

I want to display attendance data of a class as:

<table>
<tr>
<th>RegNo</th>

<th>Name</th>

<th>Date 1</th>

<th>Date 2</th>

<th>so on</th>

</tr>

<tr>

<td>1</td>

<td>ABC</td>

<td>Present</td>

<td>Absent</td>

<td>So on</td>

</tr>

</table>

Date range is from classes table. I want to query the tables with date range as well as for all record of a class. Kindly help me with the query. Thanks in advance.

  • have you tried any query ? plz show, We will help, if you havent made your query, I would suggest you to use join , – Hytool Dec 02 '15 at 10:22
  • thanks Hytool, yes, i have tried it. but it seems like i dont have any clue about it. I am displaying the dates from range of dates stored in classes table as column heading and then querying class attendance table for result rows. then for dates column in result rows, i am again displaying columns of dates except matching the dates with attendance dates and displaying the attendance. but it only displays attendance under one date. – Aamir Bashir Dec 02 '15 at 10:48

0 Answers0