Код: Выделить всё
$designate = $this->db->get_where('teacher' , array('teacher_id' => $teacher123, 'name' => $teachername))->row()->designation;
$subjects = $this->db->get_where('subject' , array(
'class_id' => $class_id , 'name' => $designate , 'year' => $this->db->get_where('settings' , array('type' => 'running_year'))->row()->description
))->result_array();
foreach($subjects as $row):
// $subjects = $this->db->get_where('subject' , array(
// 'class_id' => $class_id , 'year' => $this->db->get_where('settings' , array('type' => 'running_year'))->row()->description
// ))->result_array();
// foreach($subjects as $row):
?>
Подробнее здесь: https://stackoverflow.com/questions/787 ... ase-in-php
Мобильная версия