所以这是查询,它只是空回来,它应该有多个结果。知道这个查询应该是什么样的吗?
Sub insertMissingDate()
Dim wks As Worksheet
Set wks = Worksheets("Sheet1")
Dim lastRow As Long
lastRow = wks.Range("C2").End(xlDown).Row
'Work bottom up since we are inserting new rows
For i = lastRow To 3 Step -1
curcell = wks.Cells(i, 3).Value
prevcell = wks.Cells(i - 1, 3).Value
'Using a loop here allows us to bridge a gap of multiple missing dates
Do Until curcell - 1 = prevcell Or curcell = prevcell
'Insert new row
wks.Rows(i).Insert xlShiftDown
'Insert missing date into new row
curcell = wks.Cells(i + 1, 3) - 1
wks.Cells(i, 3).Value = curcell
Loop
Next i
End Sub
这是DB 2016-07-17 15:00:00的日期 以下是2016-07-17 15:00:00传递的内容
答案 0 :(得分:0)
$bookings = $orders->find('all')->where(['Orders.booking_date_time' => $date_time, 'Orders.tour_id' => $tour_id]);
这是我正在寻找的正确查询。