如何在此处获取最近两天的记录是我的查询,但出现错误。
function getbdologHistoryByRefManuals($obj)
{
$this->db->select('bdo_logs.*,transaction_statuses.status');
$this->db->from('bdo_logs');
$this->db->join('transactions','transactions.id=bdo_logs.id');
$this->db->join('transaction_statuses','transaction_statuses.id=transactions.trans_status_id');
$this->db->where('log_date >', ADDDATE( CURDATE( ) , INTERVAL -2 DAY ));
$query = $this->db->get();
//echo $this->db->last_query();
if($query->num_rows() == 0){
return null;
}
return $query->result();
}