1 回答
TA贡献1821条经验 获得超6个赞
我终于想通了:)
$time_between = Batch::find()->where([
'start_date' => '2020-03-01',
'venue_id' => 1
])->andWhere([
'OR',
[
'OR',
[
'between',
'end_time',
$model->start_time,
$model->end_time
],
[
'between',
'start_time',
$model->start_time,
$model->end_time
]
],
[
'AND',
[
'<=',
'start_time',
$model->start_time
],
[
'>=',
'end_time',
$model->start_time
]
]
]);
- 1 回答
- 0 关注
- 144 浏览
添加回答
举报
