Joe,

First of all I am not sure if you need LEFT JOIN for both comments and
prices. My first example was based on the assumption that you could have
photos without comments and you might want to display those as well.

It will help if you can paste the entire query and your output code.

Thanks

Qasim

On 7/22/07, Joel Watson <[EMAIL PROTECTED]> wrote:
>
> >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...
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284343
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to