title: Get all records between two dates
body: <p>How can i fetch all records between two date field dates in mysql table.Am using code igniter for my application.</p>
  
  <p>Am entering start date and end date from date picker , need to fetch all rowas >= startdate and &lt;= end date</p>
  
  <p>my code:-</p>
  
  <pre><code> $this-&gt;db-&gt;where('start_date &lt;= ',$start_date);
   $this-&gt;db-&gt;where('end_date &gt;= ',$end_date);
  </code></pre>
  
  <p>My query :-  SELECT * FROM <code>table</code> WHERE <code>start_date</code> &lt;= '2016-04-13' AND <code>end_date</code> >= '2016-04-19'</p>
  
  <p>This is fetching only one row from table.</p>
  
  <p>Please help</p>