title: Sorting data according to current date
body: <p>I have a table of <code>posts</code> like this</p>
  
  <pre><code>+--------------------+--------------+
  | Field              | Type         |
  +--------------------+--------------+
  | id                 | int(11)      |
  | title              | varchar(255) |
  | body               | text         | 
  | published_at       | datetime     |
  +--------------------+--------------+
  </code></pre>
  
  <p>What I want achieve is to <code>order</code> by <code>published_at</code>. Normally I would do:</p>
  
  <pre><code>SELECT * FROM posts ORDER BY published_at;
  </code></pre>
  
  <p>But my requirement here is that the query should fetch the results from current date on top and then the previous ones and after that fetch those from future. </p>
  
  <p>Current my results are as follows:</p>
  
  <pre><code>+-------------------------------+----+---------------------+
  | title                         | id | published_at        |
  +----------------------------------------------------------|
  | Hello world                   |  1 | 2015-01-06 12:21:16 |
  | 20+ Tools For RoR Development |  2 | 2015-08-25 12:21:23 |
  | Angular JS tutorial           |  3 | 2015-09-31 10:51:55 |
  | Visual search                 |  4 | 2015-03-12 12:27:26 |
  | Ruby on Rails best practices  |  5 | 2015-01-21 00:00:00 |
  +-------------------------------+----+---------------------+  
  </code></pre>
  
  <p>Whereas my desired outcome would be:</p>
  
  <pre><code>+-------------------------------+----+---------------------+
  | title                         | id | published_at        |
  +----------------------------------------------------------|
  | 20+ Tools For RoR Development |  2 | 2015-08-25 12:21:23 |
  | Hello world                   |  1 | 2015-01-06 12:21:16 |
  | Ruby on Rails best practices  |  5 | 2015-01-21 00:00:00 |
  | Visual search                 |  4 | 2015-03-12 12:27:26 |
  | Angular JS tutorial           |  3 | 2015-09-31 10:51:55 |
  +-------------------------------+----+---------------------+
  </code></pre>