我正在使用laravel 5.5并使用以下查询检查事件检查插槽是否在2次之间可用:
$schedules->where('id', $id)
->wherebetween($date, ['start','end'])
->orwherebetween($endTime, ['start','end'])
->orwherebetween('start', [$date,$endTime])
->orderBy('start')->get();
遇到此错误
“消息”:“ SQLSTATE [42S22]:找不到列:1054未知列 'where子句'中的'2019-03-06 13:00:00'
答案 0 :(得分:0)
它是因为第一个参数应该是列的名称:
您应将代码更改为:
->wherebetween('column name', ['1st date','2nd date'])
->orwherebetween('column name', ['1st date','2nd date'])
答案 1 :(得分:0)
我通过添加$tc = get-process -Name totalcmd* | Select-Object -ExpandProperty Name
echo $tc
...
read more
DB::raw()