php - Group by one column and Show all results from another column -
hi guys trying solve , can't find solution.
i have 2 columns, trying make select , group first column , display records second column. table is:
regno name c117 mariya mathew c117 baino baby c117 mathews reji c120 nithin abraham c120 vipin saji c120 veetu thomman
so results supposed be:
c117 mariya mathew, baino baby, mathews reji c120 nithin abraham, vipin saji, veetu thomman
kindly me...thanks in advance...
use group_concat
select regno, group_concat(name separator ', ') names mytable group regno
Comments
Post a Comment