diff options
author | Andrew Dolgov <[email protected]> | 2015-06-17 17:00:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-06-17 17:00:36 +0300 |
commit | 4947c02e1a035659706a255ab5957e4dabafab87 (patch) | |
tree | 1a99ddd6cba887b966044c1ce65192f91720bd80 | |
parent | 3c43def90f62ef40fb177c35275413ee62a5d642 (diff) |
show article count in bayes stats
-rw-r--r-- | plugins/af_sort_bayes/init.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/af_sort_bayes/init.php b/plugins/af_sort_bayes/init.php index 958127689..7699d2c4d 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 "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Bayesian classifier (af_sort_bayes)')."\">"; - $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 "<table>"; - print "<tr><th>Category</th><th>Probability</th><th>Word count</th></tr>"; + print "<tr><th>Category</th><th>Probability</th><th>Word count</th><th>Article count</th></tr>"; while ($line = $this->dbh->fetch_assoc($result)) { print "<tr>"; |