I wouls assume that the second query has more than one row returned, therefore it will 
iterate through each loop of the cfloop until it reaches the end of the query results. 
 Then it will return to the cfquery tag, iterate to the next query1 result, then go 
and loop through query2 completely again.

We've run into this problem, but as yet that construct has not given us issues 
(everything works appropriately).  Perhaps you have query1 and query2 backwards?  If 
query1 is supposed to be changing for every row of query 2, then perhaps reversing the 
nesting might yield better results.

FWIW,
-lincoln

-----Original Message-----
From: Peter Mayer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 9:26 AM
To: CF-Talk
Subject: cfoutput + cfloop: bug or 


Hello!

I have two queries - the output of the first one is handled by a cfoutput 

tag, the second one is handled by a cfloop (nested construction):

<cfoutput query="query1">
bla bla #query1.name#:
<cfloop query="query2>
#query2.surname# (event: #query1.eventtitle#)<br>
</cfloop>

</cfoutput>


Now I have the result that query1.eventtitle always returns the first row 

of query1, it's not looping as desired.

my workaround:

<cfoutput query="query1">
bla bla #query1.name#:
<cfset a_str_title = query1.eventtitle>

<cfloop query="query2>
#query2.surname# (event: #a_str_title#)<br>
</cfloop>

</cfoutput>

This works as expected.

We are on CF 5 (MX in the future time)

Best regards,

Peter 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to