Tony,

That's a known problem. To work around it, just set a local variable in the
outer loop equal to the value in Query1 you want to pass to Query2 and
access *that* variable inside of your inner loop.

~Dina

----- Original Message -----
From: "Tony Schreiber" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, March 27, 2003 11:04 AM
Subject: Nested Query Loop Bug/Issue


> I don't know if any of you have run into this before or if it's even been
> mentioned (couldn't find it at mm technotes either), but I've run into a
> situation where the values of an outer loop referred to in an inner loop
> are not what you expect. I was burned on this recently and remember
> vaguely it happening to me before. I've written some demonstration code to
> illustrate:
>
> http://www.simplemessageboard.com/loopbug.cfm
>
> The solution as shown in the code is to set a local variable BEFORE you
> begin the inner loop to hold the value of the outer loop you want to refer
> to within the inner loop.
>
> Anyone had this happen? Or is this expected behavior that I can't see?
>
> BTW, this is CF5, I don't know about MX.
>
>
> Tony Schreiber, Senior Partner                  Man and Machine, Limited
> mailto:[EMAIL PROTECTED]                   http://www.technocraft.com
>
> http://www.is300.net The Enthusiast's Home of the Lexus IS300 since 1999
> http://www.simplemessageboard.com    Free Forum Software for Cold Fusion
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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