using BETWEEN in WHERE condition

前端 未结 6 1928
萌比男神i
萌比男神i 2020-12-09 04:26

I\'d like the following function to select hotels with an accomodation between a certain $minvalue and $maxvalue. What would be the best way to do

6条回答
  •  孤街浪徒
    2020-12-09 04:36

    Sounds correct but some issues maybe creates executing this query: I would suggest:

    $this->db->where( "$accommodation BETWEEN $minvalue AND $maxvalue", NULL, FALSE );
    

提交回复
热议问题