Mar 29
This is really simple, but I do it all the time: looping through a query because you can’t nest query-driven <cfoutput>. The pattern is queryname.fieldname[x], and that’s all you really have to remember.
Here’s an example:
<cfoutput query=”myFirstQuery”> #fieldFromMyFirstQuery#<br /> [[ Insert Second Query Here ]] <cfif #mySecondQuery.recordCount# GT 0> <cfloop from=”1” to=”mySecondQuery.recordCount#” index=”thisRecord”> #mySecondQuery.fieldFromMySecondQuery[thisRecord]#<br /> </cfloop> </cfoutput>
Recent Comments