title: PHP MySQLI query WHERE current data = date in database
body: <p>I have been trying to get PHP to retrieve any results that have the date stamp that is the same as in the column 'date'. <br>
  It then loops round and prints out all the data retrieved. <br>
  The actual retrieval works fine, its just my condition! </p>
  
  <p>Code: </p>
  
  <pre><code>$currentdate = date('Y/m/d'); 
  $echo . $currentdate;
  $query = "SELECT * FROM `pupils` WHERE `$currentdate` = date";//Grab the data
  $result = mysqli_query($con, $query);
  </code></pre>
  
  <p>Any help greatly appreciated! </p>