Php 拉威尔雄辩音程10+;
我的问题是我不能让它工作的时间间隔Php 拉威尔雄辩音程10+;,php,database,laravel,eloquent,intervals,Php,Database,Laravel,Eloquent,Intervals,我的问题是我不能让它工作的时间间隔 $totalCount = $datamodel->select('*') ->where('country', 'like', $selectionfield) ->whereBetween('MEASUREDTIME', [$begindatum, $einddatum]) ->where('gpsvalid', '=', 1) --&g
$totalCount = $datamodel->select('*')
->where('country', 'like', $selectionfield)
->whereBetween('MEASUREDTIME', [$begindatum, $einddatum])
->where('gpsvalid', '=', 1)
-->whereRaw('receivedtime<=(MEASUREDTIME + INTERVAL 10 MINUTE)')
->get();
$totalCount=$datamodel->select('*'))
->其中('country','like',$selectionfield)
->其中('MEASUREDTIME',[$begindatum,$einddatum])
->其中('gpsvalid','=',1)
-->whereRaw('receivedtime您不需要为此使用原始查询。laravel有whereRaw
方法
$totalCount = $datamodel->select('*')
->where('country', 'like', $selectionfield)
->whereBetween('MEASUREDTIME', [$begindatum, $einddatum])
->where('gpsvalid', '=', 1)
->where('receivedtime', '<=', DB::raw('MEASUREDTIME + INTERVAL 10 MINUTE'))
->get();
$totalCount=$datamodel->select('*'))
->其中('country','like',$selectionfield)
->其中('MEASUREDTIME',[$begindatum,$einddatum])
->其中('gpsvalid','=',1)
->where('receivedtime','Laravel是否抛出错误?如果是,您是否可以包含错误转储?如果我的更新答案给出错误,请尝试->where('receivedtime','We's going where's note error now say Message:ORA-00904:“(测量时间+间隔10分钟)”:无效标识符位置:170您可以尝试此操作吗?->何处('receivedtime','->whereRaw('receivedtime'),->where再次给出缺少的右括号