title: How to get data by date from database to using codeigniter
body: <p>I want to get data of last week. I try many ways but always get errors or nun results.</p>
  
  <pre><code>$query = "SELECT `toy1`,`toy2`
      FROM
        `tabel`
            WHERE `data1` != 'str' &amp;&amp;`data2` = 'str' &amp;&amp; `date_row` &gt;= '2014/12/08' AND `postdate` &lt;= '2014/12/01' Limit 0,6";
       $q = $this-&gt;db-&gt;query($query);
            $rr = $q-&gt;result();
  </code></pre>