-1
ORDER BY
不起作用。我嘗試過我知道的方式,但它不會排序,爲什麼?排序不工作Codeigniter
回報:調用一個成員函數result_array()上布爾
public function getDetailbyClsandSection($class_id, $section_id, $exam_id) {
$query = $this->db->query("SELECT exam_schedules.*,subjects.name,subjects.type FROM exam_schedules,teacher_subjects,exams,class_sections,subjects WHERE exam_schedules.teacher_subject_id = teacher_subjects.id and exam_schedules.exam_id =exams.id and class_sections.id =teacher_subjects.class_section_id and teacher_subjects.subject_id=subjects.id and class_sections.class_id =" . $this->db->escape($class_id) . " and class_sections.section_id=" . $this->db->escape($section_id) . " and exam_id =" . $this->db->escape($exam_id) . " and exam_schedules.session_id=" . $this->db->escape($this->current_session));
return $query->result_array();
}
500錯誤是服務器錯誤,而不是MySQL的。你可能犯了一些語法錯誤。 – learner
@learner有什麼辦法呢? –
@learner當沒有任何語法錯誤存在時它仍然不起作用 –