Hi,
I was wondering which one are best practices when doing a db insert/update:
<cfqueryparam value="#lfield#" cfsqltype="CF_SQL_INTEGER" null="#iif((filed
eq ""), de("yes"), de("no"))#" />,
or
<cfif val (field) gt 0)>
<cfqueryparam value="#lfield#" cfsqltype="CF_SQL_INTEGER" />
<cfelse>
null
</cfif>
First one seems more compact but not sure the delay evaluation. I mean for a
couple a columns I guess it doesn't matter but for a big table it may add
up.
The second one looks more clear. At least for me
Thanks
Victor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:254401
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4