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 "
"; - $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