As i was using comma separated values in DB every one suggested me to normalize table so i normalized my table now my table looks like this
tuitor table
tuitor_id | name | mobile |etc
1 | xyz |14562547|anyinputs
2 |abc |47545875|text
3 |abd |47854874|yyy
now my normalized table is tuitor_keyword
tuitor_keyword_id | id_tuitor | id_keyword
1 | 1 |123
2 | 1 |124
3 | 2 |123
4 | 2 |155
5 | 1 |187
while retrieving any tuitor i want keywords in comma like for id_tuitor=1 it should be 123,124
this is the query what i am using
$this->db->select('*')->from('tuitor');
$this->db->join('tuitor_keyword','tuitor.tuitor_id = tuitor_keyword.id_tuitor','left');
$query=$this->db->get();
return $result = $query->result_array();
It is creating new array for for tuitor_keyword_id what should i do please correct me i know i have done plenty of mistakes