title: Mysql sort by date not working as expected
body: <p>I am pulling records out of my mysql database using php and want to order them by a database field called expdate.</p>
  
  <p>The dates for the reminders are stored in the table in this format 17-04-12 as varchar.</p>
  
  <p>I am using the following code to pull all the records out and order them by the expdate column.</p>
  
  <pre><code>    &lt;table border="0" style="text-align:left;"&gt;
        &lt;tr style="text-align:left;"&gt;
          &lt;th style="text-align:left;" width="200px"  scope="col"&gt;Name&lt;/th&gt;
          &lt;th style="text-align:left;" width="200px"  scope="col"&gt;Email&lt;/th&gt;
        &lt;th style="text-align:left;" width="200px" scope="col"&gt;Telephone&lt;/th&gt;
        &lt;th style="text-align:left;" width="200px" scope="col"&gt;Current Cover Expires&lt;/th&gt;
        &lt;/tr&gt;
      &lt;?php
      $today = date("d-m-y");
      $result = mysql_query("SELECT * FROM ymeg_chronoforms_data_NewsletterSubscribe ORDER BY expdate")or die(mysql_error());
  
      echo '&lt;tr style="text-align:left;"&gt;';
      while($row = mysql_fetch_array($result))
        {
          echo '&lt;td style="text-align:left;"&gt;';  
        echo $row['name'];
        echo '&lt;/td&gt;'; 
        echo '&lt;td style="text-align:left;"&gt;'; 
        echo $row['email'];
           echo '&lt;/td&gt;'; 
      echo '&lt;td style="text-align:left;"&gt;'; 
        echo $row['tel'];
           echo '&lt;/td&gt;'; 
       echo '&lt;td style="text-align:left;"&gt;'; 
        echo $row['expdate'];
          echo '&lt;/td&gt;'; 
        echo "&lt;/tr&gt;";
        }
  
        ?&gt;
  
  
      &lt;/table&gt;
  </code></pre>
  
  <p>The problem is, the columns are being sorted quite randomly, it outputs the records and sorts them by this date order :</p>
  
  <pre><code>08-07-12
  17-05-12
  17-05-13
  </code></pre>