I always forget that comparison operators generate a result!!!!
Hence things are possible like:
<cfreturn myVar EQ 9 />
or null="#myVar EQ 10#" in cfqueryparam tags (null takes a
string-literal representation of a boolean, hence that resolves to
null="true" or null="false").
They generate a result as surely as math operators do... duh.
I've been using iif(myVar EQ 10,DE("false"),DE("true")) in this
case... but I can quit that. NOW! I promise to get better, really,
really I do!
Thanks to Joe Rinehart for pointing this out to me and simplifying my
cfreturn tags from
<cfif myVar EQ 10>
<cfreturn true />
<cfelse?
<cfreturn false />
</cfif>
Laterz,
J
On 4/26/05, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote:
> Are there any best practices for nulling cfqueryparam values?
> Currently I'm having to write a cfscript before this insert query that
> checks each value and then sets a specific null variable value that is
> then called from the cfqueryparam tag, otherwise the query fails.
> Problem is, it's a ton of code (inserting a bunch of columns), I'm
> feeling lazy (it's 5:01 and I've been at this page all day), and I
> think there should be an easier way (why oh why isn't there an
> "autonull" attribute for cfqueryparam?).
>
> Anyone?
>
> Pete
--
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204591
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