diff --git a/Access_Core.php b/Access_Core.php index 4f473db..792631e 100644 --- a/Access_Core.php +++ b/Access_Core.php @@ -180,12 +180,12 @@ class Access_Core // "SELECT DISTINCT ip FROM {$this->table} {$where} AND `time` BETWEEN {$start} AND {$end}")); $this->overview['ip'][$day]['hours'][$i] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count') ->from('(' . $this->db->select('DISTINCT ip')->from('table.access_log') - ->where('time >= ? AND time <= ?', $start, $end) . ') AS tmp'))[0]['count']); + ->where("time >= {$start} AND time <= {$end}") . ') AS tmp'))[0]['count']); $this->overview['ip'][$day]['total'] += $this->overview['ip'][$day]['hours'][$i]; // "SELECT DISTINCT ip,ua FROM {$this->table} {$where} AND `time` BETWEEN {$start} AND {$end}")); $this->overview['uv'][$day]['hours'][$i] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count') ->from('(' . $this->db->select('DISTINCT ip,ua')->from('table.access_log') - ->where('time >= ? AND time <= ?', $start, $end) . ') AS tmp'))[0]['count']); + ->where("time >= {$start} AND time <= {$end}") . ') AS tmp'))[0]['count']); $this->overview['uv'][$day]['total'] += $this->overview['uv'][$day]['hours'][$i]; // "SELECT ip FROM {$this->table} {$where} AND `time` BETWEEN {$start} AND {$end}")); $this->overview['pv'][$day]['hours'][$i] = intval($this->db->fetchAll($this->db->select('COUNT(1) AS count')