Welcome Guest, Not a member yet? Register   Sign In
Display Loading Image While Page Loads
#4

(This post was last modified: 09-17-2018, 10:47 PM by kayinja.denis.)

(09-17-2018, 07:39 AM)php_rocs Wrote: @kayinja.denis,

Any reason why it takes so long to go through the calculations?

yes,
I've two loops
one for students and the other is for subject, in order to get the students' marks i've to loop into mark table to get marks for each student each subject
PHP Code:
foreach($students as $student){
$studentID $student->student;
foreach(
$subjects as $subject){
$subjectID=$subject->subjectID;

$mark=$this->db->query("select * from mark
          where mark.classesID = '
$classID' && mark.studentID = '$studentID
          && mark.subjectID = '
$subjectID' ")->row()->mark;
}


so if I've more than 10 students per class doing more than 5 subjects,
it'll take long to iterate through that mark query,
so that's why I need that loading display but the one i've got is not doing what i want.
Reply


Messages In This Thread
RE: Display Loading Image While Page Loads - by kayinja.denis - 09-17-2018, 10:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB