笨查詢陣列忽略行的第一行,但顯示的休息,這可能是這樣做的原因??? ...笨查詢數組不顯示第一個記錄,但沒有別的顯示
function index() {
$date = date('Y-m-d');
/* $result = $this->smsgateway->SendAbsentSMS(date('Y-m-d', $this->customlib->datetostrtotime($date))); */
$student = $this->stuattendence_model->student_daily_attendance($date);
print_r($student);
}
public function student_daily_attendance($date) {
$this->db->select('students.id,students.firstname,students.lastname,students.guardian_phone,students.roll_no,classes.id,classes.class,sections.id,sections.section,student_attendences.*,student_session.id,student_session.class_id,student_session.section_id,student_session.session_id');
$this->db->from('students');
$this->db->join('student_session', 'student_session.student_id = students.id');
$this->db->join('classes', 'classes.id = student_session.class_id');
$this->db->join('sections', 'sections.id = student_session.section_id');
$this->db->join('student_attendences', 'student_attendences.student_session_id = students.id');
$this->db->where('date', $date);
$query = $this->db->get();
return $query->result_array();
}
粘貼「student_daily_attendance」函數的代碼。 –
'student_daily_attendance()'函數在'stuattendence_model'中做了什麼? –
粘貼功能 –