From 430649df813e9b6f9d27f6e5acdae6980b359422 Mon Sep 17 00:00:00 2001 From: jrotty Date: Sat, 10 Nov 2018 14:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=87=E7=AD=BE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- var/Widget/Stat.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/Widget/Stat.php b/var/Widget/Stat.php index 466bfa09..f7cc773b 100644 --- a/var/Widget/Stat.php +++ b/var/Widget/Stat.php @@ -360,4 +360,17 @@ class Widget_Stat extends Typecho_Widget ->from('table.metas') ->where('table.metas.type = ?', 'category'))->num; } + + /** + * 获取标签数目 + * + * @access protected + * @return integer + */ + protected function ___tagsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(mid)' => 'num')) + ->from('table.metas') + ->where('table.metas.type = ?', 'tag'))->num; + } }