我想从一年前的现在开始获取所有记录,但它并不完全有效。使用 CodeIgniter 制作
这是我的查询,有什么问题吗?:
$currentDate = date("Y-m-d H:m:s");
$yeardate=date('Y-m-d H:m:s', strtotime('-1 year'));
$this->db->select('TimeStamp');
$this->db->where('Transaction', 'COMPLETED');
$this->db->where('TimeStamp>=',$yeardate);
$this->db->where('TimeStamp<=',$currentDate);
$query = $this->db->get('R_Logs');
$results = $query->result();
提前致谢