在 WHERE 条件下使用 BETWEEN
2022-08-30 20:14:06
我希望以下功能来选择在某个和.最好的方法是什么?$minvalue
$maxvalue
function gethotels($state_id,$city,$accommodation,$minvalue,$maxvalue,$limit,$pgoffset)
{
$this->db->limit($limit, $pgoffset);
$this->db->order_by("id", "desc");
$this->db->where('state_id',$state_id);
$this->db->where('city',$city);
// This one should become a between selector
$this->db->where($accommodation,$minvalue);
$result_hotels = $this->db->get('hotels');
return $result_hotels->result();
}