作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

order

@@ -34,8 +34,14 @@ class AdminStatisticsController extends AdminBaseController{ @@ -34,8 +34,14 @@ class AdminStatisticsController extends AdminBaseController{
34 ->field('b.hospital,count(*) as num') 34 ->field('b.hospital,count(*) as num')
35 ->join('equipment b','a.eq_name=b.name') 35 ->join('equipment b','a.eq_name=b.name')
36 ->group('b.hospital') 36 ->group('b.hospital')
37 - ->select();  
38 - dump($data); 37 + ->select()->toArray();
  38 + $hospital=array();
  39 + $num=array();
  40 + foreach ($data as $k=>$v){
  41 + $hospital[]=$v['hospital'];
  42 + $num[]=$v['num'];
  43 + }
  44 + dump($hospital,$num);
39 45
40 46
41 //周统计 47 //周统计