Merge pull request #801 from jrotty/patch-1

增加标签统计
This commit is contained in:
joyqi
2018-11-21 13:32:00 +08:00
committed by GitHub
+13
View File
@@ -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;
}
}