<?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: &#8220;You want to do what?&#8221;</title>
	<atom:link href="http://www.sitepoint.com/blogs/2006/11/30/you-want-to-do-what/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2006/11/30/you-want-to-do-what/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<pubDate>Fri, 05 Dec 2008 00:33:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: casuzen</title>
		<link>http://www.sitepoint.com/blogs/2006/11/30/you-want-to-do-what/#comment-119452</link>
		<dc:creator>casuzen</dc:creator>
		<pubDate>Fri, 08 Dec 2006 05:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1800#comment-119452</guid>
		<description>sorry...last line of previous message should be

ORDER by firstsort, lookupdisplay</description>
		<content:encoded><![CDATA[<p>sorry&#8230;last line of previous message should be</p>
<p>ORDER by firstsort, lookupdisplay</p>]]></content:encoded>
	</item>
	<item>
		<title>By: casuzen</title>
		<link>http://www.sitepoint.com/blogs/2006/11/30/you-want-to-do-what/#comment-119450</link>
		<dc:creator>casuzen</dc:creator>
		<pubDate>Fri, 08 Dec 2006 05:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1800#comment-119450</guid>
		<description>cfquery name="getLocations" datasource="MyDSN"&#62;
  select * as   
(SELECT '1' as firstsort,'Corporate Posting (Waco, TX)' as lookupdisplay, -99 as franchiseeeid)
Union
     (SELECT '2' as firstsort, franchiseeName + ' (' + city + ', ' + stateProvince + ')' AS lookupdisplay, franchiseeid AS lookupkey   
      FROM franchisee)    
ORDER BY lookupdisplay</description>
		<content:encoded><![CDATA[<p>cfquery name=&#8221;getLocations&#8221; datasource=&#8221;MyDSN&#8221;&gt;<br />
  select * as<br />
(SELECT &#8216;1&#8242; as firstsort,&#8217;Corporate Posting (Waco, TX)&#8217; as lookupdisplay, -99 as franchiseeeid)<br />
Union<br />
     (SELECT &#8216;2&#8242; as firstsort, franchiseeName + &#8216; (&#8217; + city + &#8216;, &#8216; + stateProvince + &#8216;)&#8217; AS lookupdisplay, franchiseeid AS lookupkey<br />
      FROM franchisee)<br />
ORDER BY lookupdisplay</p>]]></content:encoded>
	</item>
	<item>
		<title>By: iso_dee</title>
		<link>http://www.sitepoint.com/blogs/2006/11/30/you-want-to-do-what/#comment-114017</link>
		<dc:creator>iso_dee</dc:creator>
		<pubDate>Sat, 02 Dec 2006 19:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1800#comment-114017</guid>
		<description>Bit of a hack, but maybe you could've made the db to do all the work?

&lt;pre&gt;&lt;code class="html"&gt;
SELECT franchiseeName + ' (' + city + ', ' + stateProvince + ')' AS lookupdisplay, franchiseeid AS lookupkey
FROM franchisee     

UNION ALL

SELECT 'Corporate Posting (Waco, TX)' as bla, -99 as bla_two
ORDER BY lookupdisplay
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Bit of a hack, but maybe you could&#8217;ve made the db to do all the work?</p>
<pre><code class="html">
SELECT franchiseeName + ' (' + city + ', ' + stateProvince + ')' AS lookupdisplay, franchiseeid AS lookupkey
FROM franchisee     

UNION ALL

SELECT 'Corporate Posting (Waco, TX)' as bla, -99 as bla_two
ORDER BY lookupdisplay
</code></pre>]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Roe</title>
		<link>http://www.sitepoint.com/blogs/2006/11/30/you-want-to-do-what/#comment-112121</link>
		<dc:creator>Paul Roe</dc:creator>
		<pubDate>Thu, 30 Nov 2006 20:15:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1800#comment-112121</guid>
		<description>I would have added a column called row number and numbered all the rows starting with 2 through the end of the query after I ordered the query. Then i would have added my row with a row id of 1. Then I would have used a QOQ to re-order the query based on the rowid column that I added.</description>
		<content:encoded><![CDATA[<p>I would have added a column called row number and numbered all the rows starting with 2 through the end of the query after I ordered the query. Then i would have added my row with a row id of 1. Then I would have used a QOQ to re-order the query based on the rowid column that I added.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Heimi</title>
		<link>http://www.sitepoint.com/blogs/2006/11/30/you-want-to-do-what/#comment-111512</link>
		<dc:creator>Heimi</dc:creator>
		<pubDate>Thu, 30 Nov 2006 05:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1800#comment-111512</guid>
		<description>My knowledge of CF is rather limited, but how about something like this:

&lt;pre&gt;&lt;code class="html"&gt;
&#60;cfquery name="getLocations" datasource="MyDSN"&#62;
     SELECT franchiseeName + ' (' + city + ', ' + stateProvince + ')' AS lookupdisplay, franchiseeid AS lookupkey
     FROM franchisee
     ORDER BY lookupdisplay
&#60;/cfquery&#62;

&#60;cfset getLocationsArray = QueryToArrayOfStructures(getLocations)&#62;
&#60;cfset corporate = StructNew()&#62;
&#60;cfset corporate.lookupdisplay = 'Corporate Posting (Waco, TX)'&#62;
&#60;cfset corporate.lookupkey = -99&#62;
&#60;cfset ArrayPrepend(getLocationsArray, corporate)&#62;
&#60;cfset getLocations = ArrayOfStructuresToQuery(getLocationsArray)&#62;
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>My knowledge of CF is rather limited, but how about something like this:</p>
<pre><code class="html">
&lt;cfquery name="getLocations" datasource="MyDSN"&gt;
     SELECT franchiseeName + ' (' + city + ', ' + stateProvince + ')' AS lookupdisplay, franchiseeid AS lookupkey
     FROM franchisee
     ORDER BY lookupdisplay
&lt;/cfquery&gt;

&lt;cfset getLocationsArray = QueryToArrayOfStructures(getLocations)&gt;
&lt;cfset corporate = StructNew()&gt;
&lt;cfset corporate.lookupdisplay = 'Corporate Posting (Waco, TX)'&gt;
&lt;cfset corporate.lookupkey = -99&gt;
&lt;cfset ArrayPrepend(getLocationsArray, corporate)&gt;
&lt;cfset getLocations = ArrayOfStructuresToQuery(getLocationsArray)&gt;
</code></pre>]]></content:encoded>
	</item>
</channel>
</rss>
