
i want to get all the departments if
Код: Выделить всё
location_id
Код: Выделить всё
3
Код: Выделить всё
3
Код: Выделить всё
cardiology
Код: Выделить всё
hair
My
Код: Выделить всё
controller
Код: Выделить всё
public function get_location_departments() { $d = $_POST['location']; $data['departments'] = $this->Hospital_model->get_location_departments($d); $this->load->view('frontend/ajax_get_departments',$data); }
Код: Выделить всё
model
Код: Выделить всё
public function get_location_departments($d) { $this->db->where_in('location_id',$d); $query=$this->db->get('department')->result(); return $query; }
Источник: https://stackoverflow.com/questions/504 ... as-implode