title: Codeigniter And MYSQL DateTime
body: <p>I Have a query as follows:</p>
  
  <pre><code>$query = $this-&gt;db-&gt;get_where('Bookings', array('Status' =&gt; 0, 'Driver_ID' =&gt; null, 'Date'=&gt; 'NOW()'));
  </code></pre>
  
  <p>The Date field is a datetime type, and I want to be garbing records where their date is the same as today, however the above, and everything else I have tired does not work.</p>
  
  <p>Can anyone one show me how to correctly pull records that date it today, ignoring the time part of datetime.</p>
  
  <p>Thanks for any help</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I Have now converted the query to the following</p>
  
  <pre><code>$start = date('Y-m-d 00:00:00');
      $end = date('Y-m-d 23:59:59');
      $query = $this-&gt;db-&gt;get_where('Bookings', array('Status' =&gt; 0, 'Driver_ID' =&gt; null, 'Date' =&gt; 'BETWEEN '.$start.' AND '.$end));
  </code></pre>
  
  <p>However still no luck, just retuning no results!</p>