title: Selecting last rows of MySQL table with PHP
body: <p>The following code selects the last 10 rows from my table, but outputs them in reverse order because it's descending. How can i reverse that? Will I need to swap the array around in PHP or can this be done with the SQL statement?</p>
  
  <pre><code>$result = mysql_query("SELECT * FROM chat ORDER BY ID DESC LIMIT 10") ;
  </code></pre>
  
  <p>So how can I swap it around so I get the most recent row first from my selected 10?
  This is more of a case of swapping the results around rather than getting last 10 rows, my code does that...</p>
  
  <p>FIXED:</p>
  
  <pre><code>mysql_query("SELECT * FROM (SELECT * FROM chat ORDER BY ID DESC LIMIT 10) chat ORDER BY ID");
  </code></pre>