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

Re: looping inside looping

Subject: Re: looping inside looping
From: Ian Skinner
Date: Thu, 02 Aug 2007 07:51:07 -0700
Newsgroups: macromedia.coldfusion.cfml_general_discussion

What exactly is the error message you are getting? IIRC you can put a cfloop inside a cfloop. I am not 100% sure about the 'query' loop, but I thought you could do that.
One thing to be aware of is that when you do this, CF can not
automatically properly scope the query variables so you need to fully
qualify them; #queryName.columnName# OR #queryName.columnName[row]#.
If you can not use the query loop for you could do for next loops.

<cffloop from="1" to="#queryName.recordCount# index="rowIndex">
  #queryName.ColumnName[rowIndex]#
  <cffloop from="1" to="#queryName2.recordCount# index="row2Index">
    #queryName2.ColumnName[row2Index]#
....

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