I was mulling this over last night....
Should there be any preference between the following two examples of
code?
<!--- Code Block 1 --->
<cfif myQuery.RecordCount>
<cfset theName = myQuery.FIRST_NAME & " " & myQuery.LAST_NAME>
<cfelse>
<cfset theName = "Undefined">
</cfif>
<!--- Code Block 2 --->
<cfset theName = "Undefined">
<cfif myQuery.RecordCount>
<cfset theName = myQuery.FIRST_NAME & " " & myQuery.LAST_NAME>
</cfif>
I prefer code block 2 as it is one less line, but are there any
technical merits between the two
Does it matter? Should I get out more? It can be grim up north you know
:-)
DC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Get the mailserver that powers this list at
http://www.coolfusion.com