NOTE - 4 After that check the date in attendece table if date is exist then update all data otherwise insert new data for the day. */ $checkExistanceOfDate = $objStudentCls->checkDateFromAttendence($atdDate, $nStandardId); echo $checkExistanceOfDate . " + " . $atdDate; /* NOTE - 4 After checking dage now insert / update all nGRNO in tblattendece to set is student is present or not in a school on the date ?. */ //$objStudentCls->setAttendenceForDate( $atdDate, $nStandardId, $allStudentnGRNO, $forStatus , $tSubjectName ) ; if ($checkExistanceOfDate > 0) { $objStudentCls->updateAttendenceForDate($atdDate, $nStandardId, $allStudentnGRNO, $forStatus, implode(" | ", $tsubject)); } else { $objStudentCls->setAttendenceForDate($atdDate, $nStandardId, $allStudentnGRNO, $forStatus, implode(" | ", $tsubject)); } if ($isAll == null) { echo " POINT-1 "; if ($forStatus == 1) { echo " POINT-2 "; $status = 0; } $allStudentnGRNO = $objStudentCls->getnGRNOFromStandard($nStandardId); while ($detail = mysqli_fetch_assoc($allStudentnGRNO)) { extract($detail); /* if ( isset($_POST[$nGRNO]) ) { $grChecked = $_POST[ $nGRNO ] ; $status = 1 ;