title: using BETWEEN in WHERE condition
body: <p>I'd like the following function to select hotels with an accomodation between a certain <code>$minvalue</code> and <code>$maxvalue</code>. What would be the best way to do that?</p>
  
  <pre><code>function gethotels($state_id,$city,$accommodation,$minvalue,$maxvalue,$limit,$pgoffset)
      {
          $this-&gt;db-&gt;limit($limit, $pgoffset);
          $this-&gt;db-&gt;order_by("id", "desc");
          $this-&gt;db-&gt;where('state_id',$state_id);
          $this-&gt;db-&gt;where('city',$city);
  
          // This one should become a between selector
          $this-&gt;db-&gt;where($accommodation,$minvalue); 
  
          $result_hotels = $this-&gt;db-&gt;get('hotels');
          return $result_hotels-&gt;result();
  
     }
  </code></pre>