>First write your sql as > >SELECT p.photoID, p.photoTitle, c.commentId, c.commentText >FROM photos p > LEFT OUTER JOIN comments c > ON c.photoid_fk = p.photoid >ORDER BY p.photoID, c.commentID > >Then output the query using cfoutput and group like this > ><ul> ><cfoutput query="yourQuery" group="photoID"> > <li>#photoTitle#</li> > <ul> > <cfoutput> > <li>#commentText#</li> > </cfoutput> > </ul> ></cfoutput> ></ul> > >HTH > >Qasim > >>
Actually, instead of only showing 1 record for each comments grouping, it repeats the entries to a weird number of iterations. So if there is one comment for photoID 16, it repeats that one entry 16 times... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284333 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

