title: CodeIgniter Query Builder - Get data with date within next 2 days
body: <p><strong>Background:</strong></p>
  
  <p>Users can create a booking. They can set a 'required by' date and time for said booking. This goes in to the db as a datetime format.</p>
  
  <p>I have a page that needs to show bookings that are upcoming within the NEXT TWO days, and not after</p>
  
  <p><strong>Issue:</strong></p>
  
  <p>I am having trouble getting the data limited to within 2 days.</p>
  
  <p>Currently I am able to get it to retrieve ALL upcoming bookings.</p>
  
  <p><strong>Current Code</strong></p>
  
  <pre><code>    $this-&gt;db-&gt;select('*');
      $this-&gt;db-&gt;from('nh_bookings');
  
      $this-&gt;db-&gt;where('nh_bookings.booking_req_by_date_time &gt; DATE_SUB(now(), INTERVAL 2 DAY)');
  
      $query = $this-&gt;db-&gt;get();
      return $query;
  </code></pre>
  
  <p>Any help would be greatly appreciated!</p>