FYI:
Just something I only just discovered after many
years of programming in CF...
I ALWAYS scope ANY variable, except for
in query loops, because if I would scope them in query loops, I
would have to scope them like
queryName.fieldName[int], and I assume that
would bring along extra overhead.
Besides, I always knew that CF looks in all
scopes if a variable is not scoped, but I never imagined that it would do so
within a loop over a query!
Anways, today I had a client variable called
"client.username" set, and I also used the variable name "username" within
a loop over a query, one of the fieldnames was "username" however this
field did not exist in the query but I did not get an error because the
variable was present in the client scope!
<cfloop query"queryName">
#username#
</cfloop>
I can't think of anything that will resolve this
issue but to rename the client variable or scope the variables within a query
loop! Like;
<cfloop from="1" to="queryName.recordCount"
index="i">
#queryName.username[i]#
</cfloop>
Anyone care to comment?
---
You are currently
subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a
blank email to [EMAIL PROTECTED]
MX Downunder
AsiaPac DevCon - http://mxdu.com/
---