如何根据codeigniter中允许的部分根据user_id显示部分

I am confused what to do after this

I have 4 sections whose id's are 1,3,4,5 now i have two employee section one is for team leads and 2nd is for employees

team leads are allowed to fill the section of assigned employee

the process is going like this user_id - team_leads assigned_for- employee

---------------------------------------
user_id | assigned_for|section_id|month
---------------------------------------
5       |10           |4,5       |jan
---------------------------------------
5       |11           |4         |feb
---------------------------------------
5       |9            |3,4,5     |march
---------------------------------------
5       |8            |1,3,4,5   |june
---------------------------------------

its not working like this as mentioned above it display 1,3,4,5 all sections to every employee This is my query

$user_id= $this->data['user_id'] = $this->_user['user_id'];     
    $q = 'select group_concat(distinct section_id) as allowed_sections from section_permissions where section_id != 0 and  user_id ='.$user_id;
    $row = $this->section_permission_model->q_single($q);
    $allowed = ($row['allowed_sections'])?explode(',',$row['allowed_sections']):array();

in view it display like this Name Date Month Action abc 2016-09-22 aug edit def 2016-09-22 jan edit abc 2016-09-22 mar edit under every same all sections are same

please provide solution