Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 拉威尔雄辩音程10+;_Php_Database_Laravel_Eloquent_Intervals - Fatal编程技术网

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再次给出缺少的右括号