title: how to compare DateTime Column with Only Date not time
body: <p>I am using mySql and my table column <code>date</code> is DATETIME type</p>
  
  <p>But i want to compare only today's date not time</p>
  
  <pre><code>       $today = date("Y-m-d",  time());
  </code></pre>
  
  <p>IF i compare date using above method it always come wrong.</p>
  
  <pre><code>$this-&gt;update("
  UPDATE `stats_tracker` 
  SET 
    `user_agent`='$this-&gt;visitor_user_agent' , 
    `referrer`='$this-&gt;referrer_page' , 
    `page_views`='$page_views' 
  WHERE 
    `visitor_ip`='$this-&gt;visitor_ip' 
    AND `page`='$this-&gt;this_page' 
    AND `date`='$today'");
  </code></pre>
  
  <p>Please Help me i am not a good mySQL programmer.</p>