Here I have a problem so when I access the admin dashboard of the system there is an error 500 which error is caused by what probably happened in the database:
https://prnt.sc/P2nHb6-T6q-L
The question is if you look at the screenshot above, there is data in the from_date column even though there is no data recorded in that column at all:
https://prnt.sc/ohiGGjfsXeyX
Then the year number digits is also wrong even though there is no data recorded in that column at all as in the first screenshot.
Here is the coding to display that section:
public function getStudentMonthlyLeave($start_date, $end_date)
{
$this->db->select('student_applyleave.*,students.firstname,students.middlename,students.lastname')
->from('student_applyleave')
->join('student_session', 'student_session.id = student_applyleave.student_session_id')
->join('students', 'students.id=student_session.student_id', 'inner');
$this->db->where('student_session.session_id', $this->current_session);
$this->db->where('students.is_active', 'yes');
$this->db->where('student_applyleave.from_date >= ', $start_date);
$this->db->where('student_applyleave.from_date <=', $end_date);
$query = $this->db->get();
return $query->result_array();
}
What causes the error and how to fix it? Thank you.