From 9b62c860a402dbc16540a156ad1d70b2922a3814 Mon Sep 17 00:00:00 2001 From: kokororin Date: Tue, 5 Sep 2017 11:55:24 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20#14:=2017.8.17=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=9A=84=E5=BB=B6=E8=BF=9F=E7=BB=91=E5=AE=9A=E6=8A=9B=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Access_Core.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')