Larave where 不能加mysql 函数问题?
DB::table('wn_devicedata')->select(DB::raw('round(avg(D2) / 100) AS inputV, round(avg(D6) / 100) AS inputPower, round(avg(D7) / 100) AS systemLoad, round(avg(D8) / 100) AS backupTime'))->where('date_add(DataTime, INTERVAL 2 MINUTE)','>','> NOW() ')->groupBy('DataTime')->get();
SQL: select round(avg(D2) / 100) AS inputV, round(avg(D6) / 100) AS inputPower, round(avg(D7) / 100) AS systemLoad, round(avg(D8) / 100) AS backupTime from
不能使用mysql 函数?
where() 条件是:第一个字段默认会 加 where(
麻烦哪位大神解救下?
SQL: select round(avg(D2) / 100) AS inputV, round(avg(D6) / 100) AS inputPower, round(avg(D7) / 100) AS systemLoad, round(avg(D8) / 100) AS backupTime from
wn_devicedatawhere
date_add(DataTime, INTERVAL 2 MINUTE) > NOW()is null group by
DataTime
不能使用mysql 函数?
where() 条件是:第一个字段默认会 加 where(
DataTime);
麻烦哪位大神解救下?
1 个回复
[已注销]
赞同来自: