nishantp1 0 Newbie Poster

Hello,

For the project I am currently working on, I have to display user's schedule from Monday to Sunday.

My database design is as follows:

course(id(PK), course_no, credits, title, description)
section(id(PK),section_no,course_id(FK),instructor_id(FK))
timeslot(id(PK),day,start_time,end_time)
section_times(section_id(PK,FK),timeslot_id(PK,FK))

Course has many sections. Sections has many time slots at which they are taught. A section is taught by only one teacher.

Running a SQL query, I get following:

Day, StartTime, EndTime, Class
M, 12:45, 1:30, Class1
W, 12:45, 1:30, Class1
T, 12:10, 1:25, Class2
Th, 12:10, 1:25, Class2
How do I go about doing this in php? I am using CodeIgniter framework. I want to display user's JUST WEEKLY schedule of classes, Monday, Tuesday, Wednesday,....Sunday. Since students have same schedule through out a semester, this will remain same for a semester. In other words, users are not allowed select a specific week and see the schedule for that week.