title: compare php datetime value with mysql query
body: <p>Compare PHP date and time value with Mysql date and time field </p>
  
  <p>for example, </p>
  
  <ul>
  <li>PHP code</li>
  </ul>
  
  <blockquote>
    <p>$date_time = date('Y-m-d H:i:s');</p>
  </blockquote>
  
  <ul>
  <li>sql query </li>
  </ul>
  
  <blockquote>
  <pre><code>$sql= "Select * from event_master where create_on='".$date_time."'";
  $result = mysql_query($sql);
  </code></pre>
  </blockquote>
  
  <p>Or other better way to compare php date &amp; time value with sql date &amp; time field value, please suggest me.</p>
  
  <p>I hope someone can give answer.</p>