<?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: PHP MySQL Order by Two Columns</title>
	<atom:link href="http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Wed, 23 May 2012 11:06:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Sowmya</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-1009</link>
		<dc:creator>Sowmya</dc:creator>
		<pubDate>Thu, 12 Apr 2012 05:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-1009</guid>
		<description>when we click on the table fields order by action has to be performed for every field when ever clicked on the field like when we click on the name filed it has to perform the order by in asc and dsc 
so plz help me out in doing so</description>
		<content:encoded><![CDATA[<p>when we click on the table fields order by action has to be performed for every field when ever clicked on the field like when we click on the name filed it has to perform the order by in asc and dsc<br />
so plz help me out in doing so</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-966</link>
		<dc:creator>Neil</dc:creator>
		<pubDate>Fri, 02 Mar 2012 06:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-966</guid>
		<description>@jsherk THX A LOT SIR!! YOU REALLY SAVED MY TIME :D</description>
		<content:encoded><![CDATA[<p>@jsherk THX A LOT SIR!! YOU REALLY SAVED MY TIME <img src='http://newsourcemedia.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: muhammed</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-965</link>
		<dc:creator>muhammed</dc:creator>
		<pubDate>Fri, 02 Mar 2012 05:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-965</guid>
		<description>I want sort table by using one column,Some case the value might be same ,Such cases I want to sort or swap that field by using another column.Please help me</description>
		<content:encoded><![CDATA[<p>I want sort table by using one column,Some case the value might be same ,Such cases I want to sort or swap that field by using another column.Please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mouli</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-689</link>
		<dc:creator>Mouli</dc:creator>
		<pubDate>Mon, 29 Aug 2011 16:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-689</guid>
		<description>Thanks... Its Working...</description>
		<content:encoded><![CDATA[<p>Thanks&#8230; Its Working&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: plr store</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-654</link>
		<dc:creator>plr store</dc:creator>
		<pubDate>Thu, 23 Jun 2011 09:36:05 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-654</guid>
		<description>Hello can&#039;t we use ORDER BY DESC when using two column names?
like 

ORDER BY column1, column2 DESC

it doesnt work.</description>
		<content:encoded><![CDATA[<p>Hello can&#8217;t we use ORDER BY DESC when using two column names?<br />
like </p>
<p>ORDER BY column1, column2 DESC</p>
<p>it doesnt work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prakash</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-574</link>
		<dc:creator>prakash</dc:creator>
		<pubDate>Tue, 01 Feb 2011 21:19:57 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-574</guid>
		<description>Thanks a lot boss.</description>
		<content:encoded><![CDATA[<p>Thanks a lot boss.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prakash</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-573</link>
		<dc:creator>prakash</dc:creator>
		<pubDate>Tue, 01 Feb 2011 21:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-573</guid>
		<description>hanks a lot boss.</description>
		<content:encoded><![CDATA[<p>hanks a lot boss.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsherk</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-569</link>
		<dc:creator>jsherk</dc:creator>
		<pubDate>Sat, 15 Jan 2011 17:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-569</guid>
		<description>If you need to combine two columns first and then sort based on the combination, you can do this:

I have two columns `lastname` and `organization`. If one is filled then the other one is always empty. A normal SELECT * FROM table ORDER BY organization,lastname would list all the organizations first and then the lastnames second, but I wanted to intermix them, so I did this:

SELECT * FROM table ORDER BY CONCAT(organization,lastname)

This will combine the two columns for the ORDER BY without actually creating a new column, so that lastname SMITH would appear in between organization RESQ and organization TIMET.</description>
		<content:encoded><![CDATA[<p>If you need to combine two columns first and then sort based on the combination, you can do this:</p>
<p>I have two columns `lastname` and `organization`. If one is filled then the other one is always empty. A normal SELECT * FROM table ORDER BY organization,lastname would list all the organizations first and then the lastnames second, but I wanted to intermix them, so I did this:</p>
<p>SELECT * FROM table ORDER BY CONCAT(organization,lastname)</p>
<p>This will combine the two columns for the ORDER BY without actually creating a new column, so that lastname SMITH would appear in between organization RESQ and organization TIMET.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web Dizajn</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-557</link>
		<dc:creator>Web Dizajn</dc:creator>
		<pubDate>Wed, 29 Dec 2010 16:29:18 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-557</guid>
		<description>if(!isset($_GET[&#039;sort&#039;])==&#039;ASC&#039;){
$sort=&#039;DESC&#039;;
$sort_link=&#039;ASC&#039;;
$sort_link2=&#039;ASC&#039;;
}else{
$sort=&#039;DESC&#039;;//will be the defualt
$sort_link=&#039;ASC&#039;;
$sort_link2=&#039;ASC&#039;;</description>
		<content:encoded><![CDATA[<p>if(!isset($_GET['sort'])==&#8217;ASC&#8217;){<br />
$sort=&#8217;DESC&#8217;;<br />
$sort_link=&#8217;ASC&#8217;;<br />
$sort_link2=&#8217;ASC&#8217;;<br />
}else{<br />
$sort=&#8217;DESC&#8217;;//will be the defualt<br />
$sort_link=&#8217;ASC&#8217;;<br />
$sort_link2=&#8217;ASC&#8217;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Complete osCommerce</title>
		<link>http://newsourcemedia.com/blog/php-mysql-order-by-two-columns/comment-page-1/#comment-523</link>
		<dc:creator>Complete osCommerce</dc:creator>
		<pubDate>Mon, 11 Oct 2010 09:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-mysql-order-by-two-columns/#comment-523</guid>
		<description>yes You are right.

if some values are same in column_1 then second sort will be applied between those values.

Thanks</description>
		<content:encoded><![CDATA[<p>yes You are right.</p>
<p>if some values are same in column_1 then second sort will be applied between those values.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
