title: Sort SQL result by date greater than today (d-M-Y)
body: <p>In my sql query I output dates in chronological order.</p>
  
  <p>The dates in my database are stored in d-M-Y format.</p>
  
  <p>What I want to do is sort the results by dates equal to or greater than today to be output first.</p>
  
  <p>In my query I have this sort in my query</p>
  
  <pre><code>...From $db ORDER BY STR_TO_DATE(sortdate, '%d-%M-%Y') ASC
  </code></pre>
  
  <p>Can anyone tell me if I can do a comparison on todays date as each record is output from the db?</p>
  
  <p>This will give me todays date </p>
  
  <pre><code>$todaysdate = date("d-M-Y", time());
  </code></pre>
  
  <p>but can anyone tell me if I can build that into my query?</p>
  
  <p>Thanks in advance.</p>