I will better explain with tables:
table size
-----------------------------
id | type | size | cont_id |
-----------------------------
1 | GP | 30 | 21 |
2 | FR | 30 | 21 |
3 | UP | 40 | 21 |
4 | GT | 50 | 32 |
5 | UP | 40 | 32 |
-----------------------------
table buy
-------------------
cont_id | cus_nam |
-------------------
21 | xxx |
32 | zzz |
------------------
Now I want to combine two column into one and then do group_concat
This is what I want to do, output table should be like this:
------------------------------------
type | cont_id |
-----------------------------------
30GP ,30FR,40UP | 21 |
50GT , 40UP | 32 |
------------------------------------