title: mysql query select yesterday, today, and tomorrow
body: <p>I'm working on a project where I must select from database all entries which dates are yesterday, today, and tomorrow. 
  The dates are stored in the database as timestamp.</p>
  
  <p>I have this PHP codes so far</p>
  
  <pre><code>$hour = 12;
  $today = strtotime("$hour:00:00");
  $yesterday = strtotime('-1 day', $today);
  $tomorrow = strtotime('+2 day', $today);
  $today = get_date($today,"timestamp");
  
  $result = $DB-&gt;query("SELECT product_id FROM " . DB_PREFIX . "expiry WHERE expiry_date BETWEEN $yesterday AND $tomorrow");
  </code></pre>
  
  <p>It's not working. please help.</p>