You should use
$this->db->where('$accommodation >=', minvalue);
$this->db->where('$accommodation <=', maxvalue);
I'm not sure of syntax, so I beg your pardon if it's not correct.
Anyway BETWEEN
is implemented using >=min && <=max.
This is the meaning of my example.
EDITED:
Looking at this link I think you could write:
$this->db->where("$accommodation BETWEEN $minvalue AND $maxvalue");