Hi all, Am I correct in saying that the IIf function and the <cfif> tag work differently on the following scenerio. In the CFIF tag, when the CFIF fails it will "jump over" the code which follows until a CFELSEIF, CFELSE or CFIF. Here's an example: ---------- <CFIF> The cfif failed so this text is not run. More to the point this code is not run, <cfquery>KILL DATABASE</cfquery> </CFIF> ----------- Where as with the IIf function, CF will still test that the code for both the true and false cases will work? This is dumb, because the whole point for an IF is to check that you will have everything you need to run the code when it returns true. :::CFIF eg::: <cfif IsDefined("foo"> <cfset foo = foo+1> </cfif> :::IIf eg::: Iif(IsDefined("foo"),DE(foo=foo+1),DE('whatever'))
Any thoughts? Cheers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239205 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54