<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: cfqueryparam and conditional handling of NULL&#8217;s</title>
	<atom:link href="http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/</link>
	<description>development in a land far far away...</description>
	<pubDate>Wed, 15 Oct 2008 23:57:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>By: jDowdle.com &#187; Blog Archive &#187; cfqueryparam, NULLs and Lists</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-71833</link>
		<dc:creator>jDowdle.com &#187; Blog Archive &#187; cfqueryparam, NULLs and Lists</dc:creator>
		<pubDate>Wed, 17 Sep 2008 16:39:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-71833</guid>
		<description>[...] Links: cfqueryparam and conditional handling of NULL’s [...]</description>
		<content:encoded><![CDATA[<p>[...] Links: cfqueryparam and conditional handling of NULL’s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-55686</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Sat, 21 Jun 2008 01:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-55686</guid>
		<description>@Eric - This would indeed work for varchars, not sure what went wrong for you. Do you have a code sample?

For radio buttons you could replace len(trim()) with isDefined("myRadioButton")

Hope that helps.</description>
		<content:encoded><![CDATA[<p>@Eric - This would indeed work for varchars, not sure what went wrong for you. Do you have a code sample?</p>
<p>For radio buttons you could replace len(trim()) with isDefined(&#8221;myRadioButton&#8221;)</p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Smith</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-55635</link>
		<dc:creator>Eric Smith</dc:creator>
		<pubDate>Fri, 20 Jun 2008 19:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-55635</guid>
		<description>You also need to mention that this is not for radio boxes.  Spent a good deal of time finding this out the hard way.

Thanks,
Eric</description>
		<content:encoded><![CDATA[<p>You also need to mention that this is not for radio boxes.  Spent a good deal of time finding this out the hard way.</p>
<p>Thanks,<br />
Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Smith</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-55595</link>
		<dc:creator>Eric Smith</dc:creator>
		<pubDate>Fri, 20 Jun 2008 14:44:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-55595</guid>
		<description>Will this work for a varchar field also?  I tried using your example and just replaced your field name and the data type and it's not working.

Thanks,
Eric</description>
		<content:encoded><![CDATA[<p>Will this work for a varchar field also?  I tried using your example and just replaced your field name and the data type and it&#8217;s not working.</p>
<p>Thanks,<br />
Eric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-41454</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Thu, 13 Mar 2008 03:22:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-41454</guid>
		<description>@Tracy - Yep, the last example in the post details that.

There was a problem with the syntax highlighter I was using so I don't think it was displaying correctly.

I've removed the highlighter for the last example and just left it bold.

Thanks</description>
		<content:encoded><![CDATA[<p>@Tracy - Yep, the last example in the post details that.</p>
<p>There was a problem with the syntax highlighter I was using so I don&#8217;t think it was displaying correctly.</p>
<p>I&#8217;ve removed the highlighter for the last example and just left it bold.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tracy Logan</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-41420</link>
		<dc:creator>Tracy Logan</dc:creator>
		<pubDate>Wed, 12 Mar 2008 16:34:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-41420</guid>
		<description>Note that (at least with CF8), there's no need for using YesNoFormat() -- like all other CF tag attributes that expect a boolean value, all the usual CF booleans will suffice (0/1, no/yes, true/false).  So a simple ...null="#NOT structKeyExists(arguments, 'age')#"... will do the trick.  I would expect this to be true of all CF versions, but only have CF8 ready to hand.</description>
		<content:encoded><![CDATA[<p>Note that (at least with CF8), there&#8217;s no need for using YesNoFormat() &#8212; like all other CF tag attributes that expect a boolean value, all the usual CF booleans will suffice (0/1, no/yes, true/false).  So a simple &#8230;null=&#8221;#NOT structKeyExists(arguments, &#8216;age&#8217;)#&#8221;&#8230; will do the trick.  I would expect this to be true of all CF versions, but only have CF8 ready to hand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Ness</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-2027</link>
		<dc:creator>Adam Ness</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-2027</guid>
		<description>I tend to use 
&#60;cfqueryparam ..... null="#trim(iFormElement) eq ''#"&#62;, which I think compiles to the same thing on the backend.  I ran some fairly extensive speed comparison tests between eq "" and not(len()) a while back and came up with the same numbers, though that was on CFMX 6.1, things may have changed in 7</description>
		<content:encoded><![CDATA[<p>I tend to use<br />
&lt;cfqueryparam &#8230;.. null=&#8221;#trim(iFormElement) eq &#8221;#&#8221;&gt;, which I think compiles to the same thing on the backend.  I ran some fairly extensive speed comparison tests between eq &#8220;&#8221; and not(len()) a while back and came up with the same numbers, though that was on CFMX 6.1, things may have changed in 7</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Ness</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-2026</link>
		<dc:creator>Adam Ness</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:52:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-2026</guid>
		<description>I tend to use 
, which I think compiles to the same thing on the backend.  I ran some fairly extensive speed comparison tests between eq "" and not(len()) a while back and came up with the same numbers, though that was on CFMX 6.1, things may have changed in 7</description>
		<content:encoded><![CDATA[<p>I tend to use<br />
, which I think compiles to the same thing on the backend.  I ran some fairly extensive speed comparison tests between eq &#8220;&#8221; and not(len()) a while back and came up with the same numbers, though that was on CFMX 6.1, things may have changed in 7</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julian Halliwell</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-1913</link>
		<dc:creator>Julian Halliwell</dc:creator>
		<pubDate>Mon, 05 Feb 2007 19:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-1913</guid>
		<description>Nice explanation Michael. I've been using the YesNoFormat trick for a while but the double negatives have always bothered me. For strings (and as Peter says it's normally strings) I've recently started using a simple "isEmptyString" UDF to make my cfqueryparams more readable.

</description>
		<content:encoded><![CDATA[<p>Nice explanation Michael. I&#8217;ve been using the YesNoFormat trick for a while but the double negatives have always bothered me. For strings (and as Peter says it&#8217;s normally strings) I&#8217;ve recently started using a simple &#8220;isEmptyString&#8221; UDF to make my cfqueryparams more readable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Bell</title>
		<link>http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-1853</link>
		<dc:creator>Peter Bell</dc:creator>
		<pubDate>Sun, 04 Feb 2007 17:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/#comment-1853</guid>
		<description>That is  nice approach to using the null - quite cool! One other approach to handling this for integers is to RegEx your string to remove all non-numerics.

If you really think it through, the benefits of cfqueryparam are primarily for strings as it stops you having to try to parse a string to remove any possible variant of delete table (or whatever injection required). For bits, dates, integers, floats and the like, a simple regex transformation and/or validation in your code is (to my mind) simpler.

Just my 2c!</description>
		<content:encoded><![CDATA[<p>That is  nice approach to using the null - quite cool! One other approach to handling this for integers is to RegEx your string to remove all non-numerics.</p>
<p>If you really think it through, the benefits of cfqueryparam are primarily for strings as it stops you having to try to parse a string to remove any possible variant of delete table (or whatever injection required). For bits, dates, integers, floats and the like, a simple regex transformation and/or validation in your code is (to my mind) simpler.</p>
<p>Just my 2c!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
