summaryrefslogtreecommitdiff
path: root/modules/comment/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-26 13:18:10 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-26 13:18:10 -0800
commitd036e2fc49a41771fb16decb0ce699245d40cff0 (patch)
tree1bfb132d2a9ca247a5a6a70c663b63d33050d8b5 /modules/comment/controllers
parentdd2bca022479f5971ca3afd3d8284474c6c5e87a (diff)
Convert another Database::instance() query over to using db::build()
Diffstat (limited to 'modules/comment/controllers')
-rw-r--r--modules/comment/controllers/admin_comments.php9
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;