title: Query from table order by date
body: <p>I have a table that looks something like this:</p>
  <pre><code>|ID |       date          |
  |-------------------------|
  | 1 | 2020/08/03 15:27:34 |
  | 2 | 2020/08/03 15:27:34 |
  | 3 | 2020/08/03 15:21:34 |
  | 4 | 2020/08/03 15:27:34 |
  | 5 | 2020/08/03 15:28:34 |
  | 6 | 2020/08/03 15:27:34 |
  </code></pre>
  <p>This is the format I use to save the current date:</p>
  <pre><code>date_default_timezone_set('Europe/Oslo');      
  $date=date(&quot;Y/m/d H:i:s&quot;); // Where $date is the value I am saving to the table.
  </code></pre>
  <p>I want to query and display the last 5, and show the newest on top. I tried it like this:</p>
  <pre><code>$query = &quot;SELECT * FROM table ORDER BY STR_TO_DATE(date, '%Y/%m/%d H:i:s') DESC LIMIT 5&quot;;
  </code></pre>
  <p>It displays 5 rows, but not in a order. This is the order I get it in:</p>
  <pre><code>Row 1: 2020/08/03 15:27:34
  Row 2: 2020/08/03 15:27:34
  Row 3: 2020/08/03 15:21:34
  Row 4: 2020/08/03 15:27:34
  Row 5: 2020/08/03 15:28:34
  </code></pre>
  <p>Ant tips?</p>