<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>水草树 &#187; 多条件排序</title>
	<atom:link href="http://mifunny.info/tag/%e5%a4%9a%e6%9d%a1%e4%bb%b6%e6%8e%92%e5%ba%8f/feed" rel="self" type="application/rss+xml" />
	<link>http://mifunny.info</link>
	<description>走走停停看看，恍然大悟。</description>
	<lastBuildDate>Sat, 27 Aug 2011 18:25:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>多条件排序- MySQL邯郸学步</title>
		<link>http://mifunny.info/multi-order-condition-in-mysql-300.html</link>
		<comments>http://mifunny.info/multi-order-condition-in-mysql-300.html#comments</comments>
		<pubDate>Tue, 27 Oct 2009 13:39:47 +0000</pubDate>
		<dc:creator>LD</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Study notes]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[多条件排序]]></category>
		<category><![CDATA[排序]]></category>

		<guid isPermaLink="false">http://mifunny.info/multi-order-condition-in-mysql-300.html</guid>
		<description><![CDATA[通常在写SQL语句时会碰到需要对结果集进行排序，使用&#8217;order by&#8217;单个条件还行，那么多个条件怎么写？ 比如:先对时间逆序，再按编号排正序。要求第二次排序不打乱对时间的排序。 1 SELECT&#160;id,name,created,action FROM&#160;tbl_jobs ORDER&#160;BY&#160;created DESC, id LIMIT 15; 如上例,直接在&#8217;order by&#8217;接第二、第三条件即可，很方便。(很久之前LD还考虑过子查询，昏.)]]></description>
			<content:encoded><![CDATA[<p>通常在写SQL语句时会碰到需要对结果集进行排序，使用&#8217;order by&#8217;单个条件还行，那么多个条件怎么写？ 比如:先对时间逆序，再按编号排正序。要求第二次排序不打乱对时间的排序。</p>
<p><font color="#ffff00">1 </font><font color="#ffff00">SELECT</font>&nbsp;id,name,created,action <font color="#ff40ff">FROM</font>&nbsp;tbl_jobs <font color="#ff40ff">ORDER</font>&nbsp;<font color="#ff40ff">BY</font>&nbsp;created <font color="#ff40ff">DESC</font>, id LIMIT <font color="#ff6060">15</font>;</p>
<p>如上例,直接在&#8217;order by&#8217;接第二、第三条件即可，很方便。(很久之前LD还考虑过子查询，昏.)</p>
]]></content:encoded>
			<wfw:commentRss>http://mifunny.info/multi-order-condition-in-mysql-300.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

