<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: MySQL Sorting</title>
	<link>http://ask.metafilter.com/95413/MySQL-Sorting/</link>
	<description>Comments on Ask MetaFilter post MySQL Sorting</description>
	<pubDate>Mon, 30 Jun 2008 13:54:53 -0800</pubDate>
	<lastBuildDate>Mon, 30 Jun 2008 13:54:53 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: MySQL Sorting</title>
		<link>http://ask.metafilter.com/95413/MySQL-Sorting</link>	
		<description>Can I combine and sort MySQL search results? &lt;br /&gt;&lt;br /&gt; I&apos;m making an A-Z list of university departments. They&apos;re in a table with fields like this:&lt;br&gt;
&lt;br&gt;
dept_name: Department of Engineering&lt;br&gt;
alt_dept_name: Engineering Department&lt;br&gt;
&lt;br&gt;
dept_name: Department of English&lt;br&gt;
alt_dept_name: English Department&lt;br&gt;
&lt;br&gt;
I can do a query that gets me every entry that has either dept_name or alt_dept_name that starts with a given letter. How can I combine the dept_names and alt_dept_names so they&apos;re sorted alphabetically together?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.95413</guid>
		<pubDate>Mon, 30 Jun 2008 13:48:04 -0800</pubDate>
		<dc:creator>kirkaracha</dc:creator>
		
			<category>mysql</category>
		
			<category>sorting</category>
		
	</item> <item>
		<title>By: zeoslap</title>
		<link>http://ask.metafilter.com/95413/MySQL-Sorting#1392838</link>	
		<description>&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/union.html&quot;&gt;union&lt;/a&gt; should do it</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.95413-1392838</guid>
		<pubDate>Mon, 30 Jun 2008 13:54:53 -0800</pubDate>
		<dc:creator>zeoslap</dc:creator>
	</item><item>
		<title>By: zeoslap</title>
		<link>http://ask.metafilter.com/95413/MySQL-Sorting#1392841</link>	
		<description>(select dept_name as a from depts)&lt;br&gt;
 union &lt;br&gt;
(select alt_dept a from depts)&lt;br&gt;
 order by a</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.95413-1392841</guid>
		<pubDate>Mon, 30 Jun 2008 13:58:16 -0800</pubDate>
		<dc:creator>zeoslap</dc:creator>
	</item><item>
		<title>By: flabdablet</title>
		<link>http://ask.metafilter.com/95413/MySQL-Sorting#1393101</link>	
		<description>Personally, I&apos;d use a numeric dept_ID field in the table that currently has your dept_name and alt_dept_name fields, and have a second table with dept_ID and dept_name fields in it.  That way, not only would your departments be able to have an arbitrary number of names, but your queries would be more straightforward.&lt;br&gt;
&lt;br&gt;
This won&apos;t be the last time you need to query as if dept_name and alt_dept_name were actually the same field.  Best to make them so.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.95413-1393101</guid>
		<pubDate>Mon, 30 Jun 2008 18:16:40 -0800</pubDate>
		<dc:creator>flabdablet</dc:creator>
	</item><item>
		<title>By: orthogonality</title>
		<link>http://ask.metafilter.com/95413/MySQL-Sorting#1393288</link>	
		<description>What zeoslap said.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.95413-1393288</guid>
		<pubDate>Tue, 01 Jul 2008 00:04:24 -0800</pubDate>
		<dc:creator>orthogonality</dc:creator>
	</item>
	</channel>
</rss>
