<?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: MySQL Question</title>
	<atom:link href="http://travisj.org/2005/10/31/mysql-question/feed/" rel="self" type="application/rss+xml" />
	<link>http://travisj.org/2005/10/31/mysql-question/</link>
	<description>cooking up the offense like he&#039;s cooking ravioli</description>
	<lastBuildDate>Sat, 03 Jul 2010 22:34:53 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: travis</title>
		<link>http://travisj.org/2005/10/31/mysql-question/comment-page-1/#comment-2965</link>
		<dc:creator>travis</dc:creator>
		<pubDate>Wed, 16 Nov 2005 22:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.eightfivethree.com/?p=962#comment-2965</guid>
		<description>&lt;p&gt;It&#039;s not bad form at all, I just know the order that I want the elements from the database in. If it were possible to dictate the specific order on an indexed column, it would be a far less expensive operation than the join operation that you are suggesting.&lt;/p&gt;

&lt;p&gt;I can think of quite a few instances (including the one I am going to implement it for) where knowing the order of just a select few ids from the table would be valid and not applying any sort of extra meaning to the ids, speficially in multiuser applications where there could be multiple lists from the same table. Your join table would be at least four columns and all indexed. Clearly more expensive than just getting the three rows you want in the order you want (if it were possible in MySQL).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It&#8217;s not bad form at all, I just know the order that I want the elements from the database in. If it were possible to dictate the specific order on an indexed column, it would be a far less expensive operation than the join operation that you are suggesting.</p>

<p>I can think of quite a few instances (including the one I am going to implement it for) where knowing the order of just a select few ids from the table would be valid and not applying any sort of extra meaning to the ids, speficially in multiuser applications where there could be multiple lists from the same table. Your join table would be at least four columns and all indexed. Clearly more expensive than just getting the three rows you want in the order you want (if it were possible in MySQL).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Leigh</title>
		<link>http://travisj.org/2005/10/31/mysql-question/comment-page-1/#comment-2964</link>
		<dc:creator>Alex Leigh</dc:creator>
		<pubDate>Wed, 16 Nov 2005 09:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.eightfivethree.com/?p=962#comment-2964</guid>
		<description>&lt;p&gt;That&#039;s a very unusual thing to want to do. It supposes that the ID representing the row is somehow meaningful to you other than for purposes of identifying the row, which is extraordinarily bad form - coding business meaning into the values of row ids.&lt;/p&gt;

&lt;p&gt;In 11 years of working with SQL in production environments, I can honestly say I&#039;ve never wanted to do what you are requesting. With that in mind, there is probably a better approach to your problem - in other words, this is not the solution you are looking for.&lt;/p&gt;

&lt;p&gt;That being said, it is possible. If you are applying static transformations to dictate order, eg in this case 1=1, 10=2, 5=3 then you can create a translation table, join the id, and then order by the transform id asc. Then hide it with a view, and never, ever tell anyone what you have done.&lt;/p&gt;

&lt;p&gt;If you have some sort of strange function for dynamically determining order that is not based on the natural order of any of the columns or combination of columns, you could also write a stored procedure to do it, although philsophically this isn&#039;t much different from having the application do it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>That&#8217;s a very unusual thing to want to do. It supposes that the ID representing the row is somehow meaningful to you other than for purposes of identifying the row, which is extraordinarily bad form &#8211; coding business meaning into the values of row ids.</p>

<p>In 11 years of working with SQL in production environments, I can honestly say I&#8217;ve never wanted to do what you are requesting. With that in mind, there is probably a better approach to your problem &#8211; in other words, this is not the solution you are looking for.</p>

<p>That being said, it is possible. If you are applying static transformations to dictate order, eg in this case 1=1, 10=2, 5=3 then you can create a translation table, join the id, and then order by the transform id asc. Then hide it with a view, and never, ever tell anyone what you have done.</p>

<p>If you have some sort of strange function for dynamically determining order that is not based on the natural order of any of the columns or combination of columns, you could also write a stored procedure to do it, although philsophically this isn&#8217;t much different from having the application do it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: travis</title>
		<link>http://travisj.org/2005/10/31/mysql-question/comment-page-1/#comment-2963</link>
		<dc:creator>travis</dc:creator>
		<pubDate>Fri, 11 Nov 2005 10:20:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.eightfivethree.com/?p=962#comment-2963</guid>
		<description>&lt;p&gt;okay, but how could I get the from the table in an order, say, 1, 10, 5?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>okay, but how could I get the from the table in an order, say, 1, 10, 5?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Leigh</title>
		<link>http://travisj.org/2005/10/31/mysql-question/comment-page-1/#comment-2962</link>
		<dc:creator>Alex Leigh</dc:creator>
		<pubDate>Fri, 11 Nov 2005 03:27:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.eightfivethree.com/?p=962#comment-2962</guid>
		<description>&lt;p&gt;select * from my_table where id = 1 or id = 5 or id = 10 order by id asc&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>select * from my_table where id = 1 or id = 5 or id = 10 order by id asc</p>]]></content:encoded>
	</item>
	<item>
		<title>By: travis</title>
		<link>http://travisj.org/2005/10/31/mysql-question/comment-page-1/#comment-2961</link>
		<dc:creator>travis</dc:creator>
		<pubDate>Wed, 02 Nov 2005 22:54:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.eightfivethree.com/?p=962#comment-2961</guid>
		<description>&lt;p&gt;thanks Wade, I think I got it now...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>thanks Wade, I think I got it now&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Wade</title>
		<link>http://travisj.org/2005/10/31/mysql-question/comment-page-1/#comment-2960</link>
		<dc:creator>Wade</dc:creator>
		<pubDate>Wed, 02 Nov 2005 22:25:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.eightfivethree.com/?p=962#comment-2960</guid>
		<description>&lt;p&gt;Hope this helps. Pick either the German or Chinese answer.&lt;/p&gt;

&lt;p&gt;Ich habe einen MySQL Tisch mit einem primären Schlüsselindex auf Identifizierung. Ich würde wie zu, zum Beispiel, wiedergewinnt Punkte mit IDENTIFIZIERUNGEN 1, 7, und 4 in das anordnet.&lt;/p&gt;

&lt;p&gt;我在身份证件以一个最初主要的标志有一张 MySQL 桌子。我想要，例如，跟身份证一起取回条款 1，在那种次序中的 7， 4。&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hope this helps. Pick either the German or Chinese answer.</p>

<p>Ich habe einen MySQL Tisch mit einem primären Schlüsselindex auf Identifizierung. Ich würde wie zu, zum Beispiel, wiedergewinnt Punkte mit IDENTIFIZIERUNGEN 1, 7, und 4 in das anordnet.</p>

<p>我在身份证件以一个最初主要的标志有一张 MySQL 桌子。我想要，例如，跟身份证一起取回条款 1，在那种次序中的 7， 4。</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Libby</title>
		<link>http://travisj.org/2005/10/31/mysql-question/comment-page-1/#comment-2959</link>
		<dc:creator>Libby</dc:creator>
		<pubDate>Tue, 01 Nov 2005 08:12:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.eightfivethree.com/?p=962#comment-2959</guid>
		<description>&lt;p&gt;Can&#039;t help you.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Can&#8217;t help you.</p>]]></content:encoded>
	</item>
</channel>
</rss>
