Get all records older than 24 hours in codeigniter Get all records older than 24 hours in codeigniter codeigniter codeigniter

Get all records older than 24 hours in codeigniter


try with INTERVAL

$this->db->where("DATE(`created_at`) + INTERVAL 1 DAY < NOW() ")->get('table_name')->result();

Read More

  1. find if date is older than 30 days