1 回答
TA贡献1921条经验 获得超9个赞
$temp = DB::select(DB::raw("select regionalid,
nvl(sum(case when lastactiontype='0' then totalcharge end),0) as creditlimit_usage,
count(case when lastactiontype='0' then msisdn end) as creditlimit_rec,
from alarms_v2
where alarmdate = '$today'
-- fatal error exception :Call to a member function get() on array --
group by regionalid order by regionalid"))->get();
在这里,您不需要调用该get()方法。因为select()方法已经执行查询并返回结果数组。因此,请像下面这样做:
$temp = DB::select(DB::raw("select regionalid,
nvl(sum(case when lastactiontype='0' then totalcharge end),0) as creditlimit_usage,
count(case when lastactiontype='0' then msisdn end) as creditlimit_rec,
from alarms_v2
where alarmdate = '$today'
group by regionalid order by regionalid"));
- 1 回答
- 0 关注
- 152 浏览
添加回答
举报