How can I retrieve data from the database by querying records between two dates using codeigniter?
Here is my code :
function date_employee_details($id,$fdate,$sdate)
{
$this->db->select('*');
$this->db->where('user_id',$id);
$this->db->where('dates >=',$fdate);
$this->db->where('dates <=',$sdate);
return $this->db->get('attendance');
}
but i got an error :
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: fdate
Filename: models/admin.php
Line Number: 726
thanks