EOF;
$count_query = new CountGrabage();
// 查询垃圾分类数据量
try {
DbUtil::query("select category,count(*) from garbage group by category order by category", $count_query);
} catch (Exception $e) {
error_res("系统出现严重异常,请联系管理员", "/");
return;
}
if (empty($count_query->getResult())) {
warn_res_with_click("暂无垃圾分类数据,请添加", <<getResult() as $item) {
$category = $item["category"];
$category_name = $item["category_name"];
$count = $item["count"];
echo <<
$category_name
$count 条
EOF;
}
}
echo <<