<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: cfqueryparam does not work in ORDER BY, what are my options?</title>
	<atom:link href="http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/</link>
	<description>Rich Internet Application development</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:10:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/comment-page-1/#comment-83176</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Thu, 27 Nov 2008 20:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=447#comment-83176</guid>
		<description>@Sebastiaan - thank for that, Pete is a master and that&#039;s yet another good resource.

Speaking of his last example I prefer this way of handling NULLs in cfqueryparams:

http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/</description>
		<content:encoded><![CDATA[<p>@Sebastiaan &#8211; thank for that, Pete is a master and that&#8217;s yet another good resource.</p>
<p>Speaking of his last example I prefer this way of handling NULLs in cfqueryparams:</p>
<p><a href="http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/" rel="nofollow">http://www.chapter31.com/2007/02/04/cfqueryparam-and-conditional-handling-of-nulls/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastiaan</title>
		<link>http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/comment-page-1/#comment-83154</link>
		<dc:creator>Sebastiaan</dc:creator>
		<pubDate>Thu, 27 Nov 2008 15:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=447#comment-83154</guid>
		<description>How about this article by Pete Freitag that addresses the times when you can NOT use CFQUERPYPARAM: http://www.petefreitag.com/item/677.cfm</description>
		<content:encoded><![CDATA[<p>How about this article by Pete Freitag that addresses the times when you can NOT use CFQUERPYPARAM: <a href="http://www.petefreitag.com/item/677.cfm" rel="nofollow">http://www.petefreitag.com/item/677.cfm</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/comment-page-1/#comment-82416</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Sat, 22 Nov 2008 23:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=447#comment-82416</guid>
		<description>@Mike, thanks for your comment. Agreed that we all need reminding on these types of things every now and then :)

I think we need a specific post on &lt;cfprocpram&gt; as well for those using stored procedures. Same in theory but it&#039;s always nice to see examples.</description>
		<content:encoded><![CDATA[<p>@Mike, thanks for your comment. Agreed that we all need reminding on these types of things every now and then <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I think we need a specific post on &lt;cfprocpram&gt; as well for those using stored procedures. Same in theory but it&#8217;s always nice to see examples.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/comment-page-1/#comment-82413</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Sat, 22 Nov 2008 23:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=447#comment-82413</guid>
		<description>@Justin, yeah I saw that one but as mentioned by Ben I like the exception handling a bit better when you&#039;re using a simple list. You could always wrap a try/catch around the &lt;cfparam&gt; but I think the &quot;list&quot; way is a bit more readable.

Re: the 2nd post...yep that is cool, I&#039;ll have to remember that!</description>
		<content:encoded><![CDATA[<p>@Justin, yeah I saw that one but as mentioned by Ben I like the exception handling a bit better when you&#8217;re using a simple list. You could always wrap a try/catch around the &lt;cfparam&gt; but I think the &#8220;list&#8221; way is a bit more readable.</p>
<p>Re: the 2nd post&#8230;yep that is cool, I&#8217;ll have to remember that!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Kelp</title>
		<link>http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/comment-page-1/#comment-82370</link>
		<dc:creator>Mike Kelp</dc:creator>
		<pubDate>Sat, 22 Nov 2008 16:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=447#comment-82370</guid>
		<description>This is a great post as it is very simple but very often forgotten. The cfqueryparam tag simply parameterizes query values for databases that support it and only in places that they support it.

Query parameters regardless of language can only work in situations where the database server&#039;s sql can support variables. For SQL server (and most databases) this does not include order by or TOP (the other big one that developer&#039;s often forget).

Thanks for a good reminder to all of us.</description>
		<content:encoded><![CDATA[<p>This is a great post as it is very simple but very often forgotten. The cfqueryparam tag simply parameterizes query values for databases that support it and only in places that they support it.</p>
<p>Query parameters regardless of language can only work in situations where the database server&#8217;s sql can support variables. For SQL server (and most databases) this does not include order by or TOP (the other big one that developer&#8217;s often forget).</p>
<p>Thanks for a good reminder to all of us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Carter</title>
		<link>http://www.chapter31.com/2008/11/22/cfqueryparam-does-not-work-in-order-by-what-are-my-options/comment-page-1/#comment-82362</link>
		<dc:creator>Justin Carter</dc:creator>
		<pubDate>Sat, 22 Nov 2008 15:40:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/?p=447#comment-82362</guid>
		<description>Another interesting way I noticed recently was in Ben Nadel&#039;s discussion on sanitising table names (which of course can apply to column names and other SQL keywords such as ASC/DESC), by using cfparam:
http://www.bennadel.com/blog/1396-Ask-Ben-Dynamic-Table-Names-In-ColdFusion-Queries.htm

e.g.


As Ben also notes in a followup post the regex pattern here matches the entire value (i.e. it implicitly uses the caret (^) to match the start of the string and the dollar sign ($) to match the end):
http://www.bennadel.com/blog/1398-ColdFusion-CFParam-Regex-Validation-Tests-Whole-Value.htm</description>
		<content:encoded><![CDATA[<p>Another interesting way I noticed recently was in Ben Nadel&#8217;s discussion on sanitising table names (which of course can apply to column names and other SQL keywords such as ASC/DESC), by using cfparam:<br />
<a href="http://www.bennadel.com/blog/1396-Ask-Ben-Dynamic-Table-Names-In-ColdFusion-Queries.htm" rel="nofollow">http://www.bennadel.com/blog/1396-Ask-Ben-Dynamic-Table-Names-In-ColdFusion-Queries.htm</a></p>
<p>e.g.</p>
<p>As Ben also notes in a followup post the regex pattern here matches the entire value (i.e. it implicitly uses the caret (^) to match the start of the string and the dollar sign ($) to match the end):<br />
<a href="http://www.bennadel.com/blog/1398-ColdFusion-CFParam-Regex-Validation-Tests-Whole-Value.htm" rel="nofollow">http://www.bennadel.com/blog/1398-ColdFusion-CFParam-Regex-Validation-Tests-Whole-Value.htm</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: chapter31.nfshost.com @ 2012-02-10 13:49:44 -->
