Mysql results from left join as an array

Hi,
I have a table that has two columns:

'code' 'image'

the code can have multiple images for example:
code              image
00004214      00004214abb_1.jpg
00004214      00004214det_1.jpg
00004214      00004214det2_1.jpg
00004214      00004214awd_1.jpg
00004214      00004214awd2_1.jpg
00004214      00004214awd3_1.jpg
00004214      00004214awd4_1.jpg
00004214      00004214awd5.jpg
00004214      00004214awd6.jpg

What I would like is the result to look like this:

code                images
00004214      00004214abb_1.jpg,00004214det_1.jpg,00004214det2_1.jpg etc

a comma separating each result from the left join.

Thanks for any help
Tony PearceAsked:
Who is Participating?
 
theGhost_k8Connect With a Mentor Database ConsultantCommented:
use group by code and group_concat(images) in your select query.
0
 
Tony PearceAuthor Commented:
Perfect
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.