title: php mysql date comparing with greater than and smaller than operator
body: <p>i am facing problem with date comparing in my Mysql datebase using php .My date field is in DATETIME and i am using this following query below but it is not returning correct answer please help me ..here is the code </p>
  
  <pre><code>"SELECT * FROM record WHERE Dateincident  &gt;=  $from AND Dateincident &lt;=$to";
  </code></pre>
  
  <p>$from and  $to are input got from jquery datepicker.</p>