Что-то не так с вызовомwhere() в моей модели.
$this->db->where("Mark_ID,(SELECT Mark_ID FROM mark WHERE Course_ID=$Course_ID && Matric_No=$Matric_No)");
Что мне следует исправить?
public function update_record($Course_ID,$Matric_No)
{
if ($Course_ID && $Matric_No != NULL) {
$data = array(
//'Course_ID' => $this->input->post('Course_ID'),
'Matric_No' => $this->input->post('Matric_No'),
'Student_Name' => $this->input->post('Student_Name'),
'Result_Mark_1' => $this->input->post('Result_Mark_1'),
'Result_Mark_2' => $this->input->post('Result_Mark_2'),
'Result_Mark_3' => $this->input->post('Result_Mark_3'),
'Result_Mark_4' => $this->input->post('Result_Mark_4'),
'Result_Mark_5' => $this->input->post('Result_Mark_5')
);
$this->db->where("Mark_ID,(SELECT Mark_ID FROM mark WHERE Course_ID=$Course_ID && Matric_No=$Matric_No)");
$this->db->update('mark', $data);
}
}
Подробнее здесь: https://stackoverflow.com/questions/229 ... using-code
Мобильная версия