Just to clarify ... Are you saying that within a CFOUTPUT or CFLOOP, CF
changes its order of precedence and looks for query. scoped variables
first? ie. <cfset x="a"><cfoutput query="abc">#x#</cfoutput> will give
abc.x rather than the local variable x?

-----Original Message-----
From: Jason Fisher [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 11, 2008 9:02 AM
To: cf-talk
Subject: Re: inserting a structure...within a structure...within a
structure

1) Main thing is that you don't need it, because you're already in the
query 'scope' inside a CFOUTPUT or CFLOOP
2) If you do a <cfoutput>#cats.category#</cfoutput> on its own, it pulls
the first record, as though it were cats.category[1].  By putting
<cfoutput query="cats">#cats.category#</cfoutput> you're expecting CF to
reference the query again, but to override its default behavior (pull
#1) to pull the CurrentRow instead.  In rare cases, this can actually
cause problems where the 1st element of the query is returned within a
loop rather than the CurrentRow element.

So, basically, just cleaner and a wee bit safer to skip it since you're
already in scope.


>Why safer to lose the query ref?
>
>Adrian
>
>structure
>
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315080
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