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

Re: Displaying query results

Subject: Re: Displaying query results
From: Azadi
Date: Thu, 16 Aug 2007 10:31:37 +0700
Newsgroups: macromedia.coldfusion.cfml_general_discussion

yes, to keep it the way you have it now, just put <cfloop query="pics"> around #pics#
but Dan has a valid point: it is better to get all your data with one
query than two queries. you could do something like:
<cfquery name="replies" datasource="yourdsn">
SELECT ...
FROM repliestable INNER JOIN picstable ON repliestable.unique_id = picstable.unique_id
WHERE ...
ORDER BY...
</cfquery>

<cfoutput query="replies" group="reply_id">
#reply#
<cfoutput>
#pics#
</cfoutput>
</cfoutput>
--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

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