登录(id,姓名,角色,user_id)老师(teacher_id)
我需要检查角色是 2。
$this->db->select('*');
$this->db->from('teacher');
$this->db->where('teacher_branch_id',$this->session->userdata('branch_id'));
$this->db->join('login','teacher.teacher_id = login.login_user_id');
$query = $this->db->get();