如何通过使用codeigniter查询两个日期之间的记录来从数据库中检索数据?
这是我的代码:
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');
}
但是我收到了一个错误:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: fdate
Filename: models/admin.php
Line Number: 726
感谢