i think thats what sean said, kinda :)
but, either way, it makes SENSE, its just weird.
and something that kinda bit us in the behind
a bit, however, its easy to code around, and now
that i know it, it wont again.

sounds like a good blog post.

tw

On 5/24/07, Ian Skinner <[EMAIL PROTECTED]> wrote:
> Sean A. Corfield:
> "Agreed. It looks like odd behavior on the surface but CF has pretty
> much always behaved that way as far as I know.
>
> <cfloop query="outer">
> .....
> <cfset somevar = outer.somecol />
> <cfloop query="inner">
> ..... reference somevar ...
> </cfloop>
> .....
> </cfloop>
>
> You can't reference outer.somecol directly inside the inner loop, you
> have to use the intermediate variable even if the column names don't
> conflict. Just one of CF's quirks..."
> ----------
> Wow, I get to show something to Sean Corfield!
>
> One can reference the outer query but one can not do it relying on the
> generic current row.  One has to fully qualify the outer query with its
> own current row value, or some other row value that makes sense to what
> one is trying to do.
>
> <cfscript>
> qryOne = queryNew("aField");
> queryAddRow(qryOne,3);
> for (i =1; i LT 4; i = i + 1)
> {
>   querySetCell(qryOne,"aField",i,i);
> }
>
> qryTwo = queryNew("bField");
> queryAddRow(qryTwo,4);
> for (i=1; i LT 5; i = i + 1)
> {
>   querySetCell(qryTwo,"bField",chr(randRange(65,90)),i);
> }
> </cfscript>
>
> <cfloop query="qryOne">
>   <cfloop query="qryTwo">
>     <strong>#qryOne.aField[qryOne.currentRow]#</strong> #qryTwo.bField#
>   </cfloop>
> </cfloop>
>
>
> Confidentiality Notice:  This message including any
> attachments is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the
> intended recipient, please contact the sender and
> delete any copies of this message.
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279124
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to