diff options
-rw-r--r-- | modules/comment/controllers/admin_comments.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_comments.php index c67fc4a4..880c33a7 100644 --- a/modules/comment/controllers/admin_comments.php +++ b/modules/comment/controllers/admin_comments.php @@ -96,11 +96,12 @@ class Admin_Comments_Controller extends Admin_Controller { $counts->published = 0; $counts->spam = 0; $counts->deleted = 0; - foreach (Database::instance() - ->select("state", "count(*) as c") + foreach (db::build() + ->select("state") + ->select(array("c" => 'COUNT("*")')) ->from("comments") - ->groupby("state") - ->get() as $row) { + ->group_by("state") + ->execute() as $row) { $counts->{$row->state} = $row->c; } return $counts; |