title: Only show last 5 days records in php
body: <p>I have a website with a simple PHP query that return records from a MYSQL table without issue.</p>
  
  <pre><code>$query = mysqli_query( $connection, "SELECT * FROM $shopname
  </code></pre>
  
  <p>I am trying to figure out how to only return the last 5 days of records based on a field called "date". The date field is a VARCHAR type in mysql. The format of the dates in the date field are like this: <strong>8/9/2016 5:52:17 PM</strong>. I did try the following query from some researching, but this doesn't return anything. What am I doing wrong?</p>
  
  <pre><code>$query = mysqli_query( $connection, "SELECT * FROM $shopname WHERE `date` &gt;= DATE_SUB(CURDATE(), INTERVAL 5 DAY)"); 
  </code></pre>
  
  <p>*IMPORTANT - I can't change mysql field to DATE. It has to be VARCHAR.</p>