Possible Duplicate:
Common programming mistakes for ColdFusion programmer to avoid?
I just spent half the day troubleshooting what is apparently a rather famous gotcha for Coldfusion MX7 and below:
The nested query loop bug:
Where you are required to reference the current_row of the outer query or else you will only see the first record.
For example:
<cfloop query="outer">
<cfloop query="innner">
<p>#outer.field#</p><!--- this won't work, you'll only get the first row --->
<p>#outer.field[current_row]#</p><!--- you must do this instead --->
</cfloop>
</cfloop>
Are there any other ways in which ColdFusion does not work in the obvious way?
serializeJSON()may* mess up your data unexpectedly e.g.'yes' --> 'true',1 --> 1.0<cfdump>may not be telling you the truthnulland[empty string]is the same in a query objectcfcatch)varscope doesn’t work as well aslocal.sometimes when it is defined multiple times in the same function<cfparam name="foo" default="#bar()#">,bar()is always invoked even though foo is defined