How to get result from database with multiple values to the same id separated by comma....
please help with this..
thank you
Id | Code
----------------------
0001 | IN,ON,ME,OH
0002 | ON,VI,AC,ZO
0003 | QA,PS,OO,ME
Assuming you are using MySQL:
SELECT
Id,
GROUP_CONCAT(Code SEPARATOR ',')
FROM
yourTable
GROUP BY Id
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.