Mysql/php - Query Question

AmoumnSon

New Member
I have been trying to figure out a different way to complete this task on another question on this website, but think maybe I am making it too difficult.Here is what I have:Table with, and ImageID, ImageName, GalleryIDAnother Table with Comments, Author, Date, ImageIDWhat I want to do is do a query where I find all of the Images that have a galleryID=42. In addition, I would like to grab all of the comments that are associated with each picture (via the ImageID) and concatenate them in a single value. For example:ImageID: 1234, ImageName: IMG425, GalleryID: 42, Comments: Cool!|||John Smith|||2010-09-06~~Nice shot!|||Richard Clark|||2010-10-01~~I remember this run.|||Susan Edwards|||2010-10-04I need to concatenate all of the results from the Comments table that are for each image and put them in as a single value, then I can parse them via PHP in the body of my page.
 
Back
Top