title: Limit results to last 10
body: <p>How can I display only the LAST 10 results from a mysql query?</p>
  
  <p>I want anything prior to the last 10 results to be ignored when the results are output.</p>
  
  <pre><code>&lt;?php
  $query = mysql_query("SELECT * FROM graphs WHERE sid=2 ORDER BY id");
  while($info = mysql_fetch_array($query)){
      $graph_id = $info['id'];
      $graph_info = $info['labels'];
      $graph_fig = $info['figures'];
  
      echo "&lt;label&gt;" . $graph_info .":&lt;span style='background-color: #06F;'&gt;" . $graph_fig . "&lt;/span&gt;&lt;/label&gt;";
  }
  ?&gt;
  </code></pre>
  
  <p><em>EDIT</em> 
  I forgot to mention that the results must be displayed in ASCENDING order sorted by the id column.</p>