macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Displaying query results

Subject: Displaying query results
From: "idesdema"
Date: Wed, 15 Aug 2007 15:50:58 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
Hello.

 I am building a custom forum system and am having trouble with the output of 
pictures that are posted to a reply.  Currently I have a replies table that 
stores the reply text and a unique key for the pictures table.  If the person 
uploads pics, up to three max, then the pictures table stores 3 rows with pic 
info and the unique id.

 When I output the forum reply, I can only output one of the pics... Not sure 
why?  I am doing 

 <cfoutput query = "forum_reply">
 <cfquery name = "pics" db = "db">
 SELECT * FROM pics WHERE unique_id = '#unique_id#'>
 </cfquery>

 #reply#
 #pics# 

 </cfoutput>

 I think I may need to loop through the reply rows or maybe a query of a query? 
 I'm not sure what I need to do but when there is a reply with more than 1 pic, 
I need all to display.

 Thanks,

 Andy


<Prev in Thread] Current Thread [Next in Thread>