Get records between date range
<p>I would like to fetch a row which comes in a particular date range </p>

<p>My query:</p>

<pre><code>SELECT * FROM `table` WHERE ((s_tdate &lt;= '2016-05-26' OR `e_expiredate` &gt;= '2016-05-26') OR (`s_tdate` &lt;= '2017-09-11' AND `e_expiredate` &gt;= '2017-09-11') OR (`s_tdate` &gt;= '2016-05-26' AND e_expiredate &lt;='2017-09-11'))

  $this-&gt;db-&gt;select(*);
  $this-&gt;db-&gt;where("((s_tdate &lt;='$start_date' AND e_expiredate &gt;= '$start_date')");
  $this-&gt;db-&gt;or_where("(s_tdate &lt;='$end_date' AND e_expiredate &gt;='$end_date')");
  $this-&gt;db-&gt;or_where("(s_tdate &gt;='$start_date' AND e_expiredate &lt;='$end_date'))");
  $query = $this-&gt;db-&gt;get('table');
</code></pre>

<p>Am getting no result.</p>

<p>Please help</p>