If you want to get the result between two dates in Codeigniter. First, you need to pass two date value in the model page and store value in a variable which value is matching to get data.
For example:
<?php $qry=$this->db->select('*')->from('Table Name') ->where("DATE_FORMAT(add_date,'%d') BETWEEN '$start_day' AND '$end_day' ")->get(); return $data=$qry->result();
Question and answer is powered by AnsPress.io