Guest User

Untitled

a guest
Jul 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. foreach ($students as $student_row){ //get each student's ID
  2. $studentID = $student_row['studentID'];
  3. foreach ($allExams as $allExam) { //get each exam's ID
  4. $examID = $allExam['examID'];
  5. foreach ($subjects as $subject){ //get each subject's ID
  6. $subjectID = $subject['subjectID'];
  7.  
  8. $obtained_mark_query = $this->db->query("select * from mark
  9. where mark.studentID = '$studentID' && mark.examID = '$examID' &&
  10. mark.subjectID = '$subjectID'")->row()->mark; //to get mark for each student per exam per subject
  11. }
  12.  
  13. }
  14.  
  15. }
Add Comment
Please, Sign In to add comment