From: Andrew Dolgov Date: Wed, 17 Jun 2015 14:00:36 +0000 (+0300) Subject: show article count in bayes stats X-Git-Tag: 16.3~301 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=4947c02e1a035659706a255ab5957e4dabafab87;p=tt-rss.git show article count in bayes stats --- diff --git a/plugins/af_sort_bayes/init.php b/plugins/af_sort_bayes/init.php index 95812768..7699d2c4 100644 --- a/plugins/af_sort_bayes/init.php +++ b/plugins/af_sort_bayes/init.php @@ -170,10 +170,13 @@ class Af_Sort_Bayes extends Plugin { print "
"; - $result = $this->dbh->query("SELECT category, probability, word_count FROM {$this->sql_prefix}_categories WHERE owner_uid = " . $_SESSION["uid"]); + $result = $this->dbh->query("SELECT category, probability, word_count, + (SELECT COUNT(id) FROM {$this->sql_prefix}_references WHERE + category_id = {$this->sql_prefix}_categories.id) as doc_count + FROM {$this->sql_prefix}_categories WHERE owner_uid = " . $_SESSION["uid"]); print ""; - print ""; + print ""; while ($line = $this->dbh->fetch_assoc($result)) { print "";
CategoryProbabilityWord count
CategoryProbabilityWord countArticle count