What you're doing is starting the first loop and even though it has 30
fields it is only doing it once before it hits the next loop, that loop will
run as many records as it has. So you're only showing the myquery.name once.
Why not do a join in the query to make it one contigous query or use
cfoutput with startrow = a number you increment yourself.


Bob Everland

-----Original Message-----
From: Peter Theobald [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 26, 2000 11:42 PM
To: CF-Talk
Subject: Cant nest CFLOOPs !


I just found out that if you nest CFLOOPs with Queries the inner CFLOOP will
undo the outer loops query variable bindings!

In other words:

<CFLOOP QUERY="myquery">
    name is #myquery.name#  (this works)<br>
    <CFLOOP QUERY="liststates">
        state is #liststates.state#  (this works)<br>
        name is #myquery.name#  (this DOES NOT WORK!) It always shows the
FIRST RECORD of myquery!<br>
    </cfloop>
</cfloop>

Can this be?! In my real-world program my outer loop is querying a table
with 30 fields! Do I actually have to put them all in temporary variables in
order to "pass" them down into the inner loop? This stinks!


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 x204 Fax 1.212.679.8032

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to