How to do BET开发者_JS百科WEEN query with codeigniter's active record?
As a standalone method $this->db->between('field_name', 'min_value', 'max_value')
, NO it does not exists. But you can use custom query strings in the where()
method:
$this->db->where('age BETWEEN 18 AND 25', NULL);
Just search the CI forums, and you will find a couple of threads about it.
simple..
use this:
$this->db->where("sampledate between '$start' and '$end'",NULL,false);
精彩评论