title: PHP: making filter by today/yesterday
body: <p>I have a filter here:</p>
  
  <pre><code>$today = time() - (3600*24);
  $Yday = time() - (3600*48);
  
  
  $getMsgsToday = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date &gt; $today ORDER by date DESC LIMIT 10");
  
  
  $getMsgsYday = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date BETWEEN $Yday AND $today ORDER by date DESC LIMIT 10");
  </code></pre>
  
  <p>Which does not work properly. If the time is 01:00, it will show you under "Today" dates from yesterday, e.g 23:00, 22:00, 21:00 and will first show you under "yesterday" after its over 01:00 the day after.</p>
  
  <p>How can i fix this so it goes with the time right? So 00:01 is today and 23:59 is yesterday.. I think ive done wrong just doing time()-(3600*24).. how should i do?</p>