<?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: Any sql guru present ?</title>
	<atom:link href="http://diebesteallerzeiten.de/blog/2008/05/13/any-sql-guru-present/feed/" rel="self" type="application/rss+xml" />
	<link>http://diebesteallerzeiten.de/blog/2008/05/13/any-sql-guru-present/</link>
	<description>Personal weblog of a web guy from Berlin/Germany with comments on programming, space exploration and assorted stuff.</description>
	<lastBuildDate>Thu, 02 Sep 2010 09:26:29 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Manolo</title>
		<link>http://diebesteallerzeiten.de/blog/2008/05/13/any-sql-guru-present/comment-page-1/#comment-21625</link>
		<dc:creator>Manolo</dc:creator>
		<pubDate>Mon, 01 Feb 2010 05:33:41 +0000</pubDate>
		<guid isPermaLink="false">http://diebesteallerzeiten.de/blog/?p=142#comment-21625</guid>
		<description>Howdy Eike.
You can always run 3 queries in the desired order, one for each ID, then merge the results into an array. Makes sense?</description>
		<content:encoded><![CDATA[<p>Howdy Eike.<br />
You can always run 3 queries in the desired order, one for each ID, then merge the results into an array. Makes sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://diebesteallerzeiten.de/blog/2008/05/13/any-sql-guru-present/comment-page-1/#comment-3083</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 14 May 2008 14:14:06 +0000</pubDate>
		<guid isPermaLink="false">http://diebesteallerzeiten.de/blog/?p=142#comment-3083</guid>
		<description>Sorry, didn&#039;t check enough, copied from dev.mysql.com, http://dev.mysql.com/doc/refman/5.0/en/select.html:

If you want to get the record in an specific order you can do it like this

SELECT * FROM table ORDER BY FIELD( id, 23, 234, 543, 23 )

id       &#124; name 
+++++++++++++++++++++++++++++++++++++++++++++++++
23       &#124; rene                      
234      &#124; miguel                    
543      &#124; ana                       
23       &#124; tlaxcala                  

or if the table as a name

SELECT * FROM table ORDER BY FIELD( name, &#039;miguel&#039;, &#039;rene&#039;, &#039;ana&#039;, &#039;tlaxcala&#039; )

id       &#124; name
++++++++++++++++++++++++++++++++
234      &#124; miguel                    
23       &#124; rene                      
543      &#124; ana                       
23       &#124; tlaxcala  


//Richard</description>
		<content:encoded><![CDATA[<p>Sorry, didn&#8217;t check enough, copied from dev.mysql.com, <a href="http://dev.mysql.com/doc/refman/5.0/en/select.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/select.html</a>:</p>
<p>If you want to get the record in an specific order you can do it like this</p>
<p>SELECT * FROM table ORDER BY FIELD( id, 23, 234, 543, 23 )</p>
<p>id       | name<br />
+++++++++++++++++++++++++++++++++++++++++++++++++<br />
23       | rene<br />
234      | miguel<br />
543      | ana<br />
23       | tlaxcala                  </p>
<p>or if the table as a name</p>
<p>SELECT * FROM table ORDER BY FIELD( name, &#8216;miguel&#8217;, &#8216;rene&#8217;, &#8216;ana&#8217;, &#8216;tlaxcala&#8217; )</p>
<p>id       | name<br />
++++++++++++++++++++++++++++++++<br />
234      | miguel<br />
23       | rene<br />
543      | ana<br />
23       | tlaxcala  </p>
<p>//Richard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://diebesteallerzeiten.de/blog/2008/05/13/any-sql-guru-present/comment-page-1/#comment-3080</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 14 May 2008 14:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://diebesteallerzeiten.de/blog/?p=142#comment-3080</guid>
		<description>Don&#039;t think it is possible to specify an exact list like that in any of the databases I&#039;ve worked with anyway, those being MySQL, Sybase and Oracle, do 3 selects in the order you want or 1 select and save the return values in variables and loop them in php instead.

//Richard</description>
		<content:encoded><![CDATA[<p>Don&#8217;t think it is possible to specify an exact list like that in any of the databases I&#8217;ve worked with anyway, those being MySQL, Sybase and Oracle, do 3 selects in the order you want or 1 select and save the return values in variables and loop them in php instead.</p>
<p>//Richard</p>
]]></content:encoded>
	</item>
</channel>
</rss>
