阿刚 2018-06-13 13:46:29 175次浏览 1条回复 0 0 0
SELECT * FROM news
WHERE (start_time < '2018-06-15 06:30:00' and end_time > '2018-06-15 06:30:00' )
OR (start_time < '2018-06-16 06:30:00' and end_time > '2018-06-16 06:30:00' )
  • 回复于 2018-06-13 14:20 举报
    $query->where(['or', 
        ['between', 'start_time', '2018-06-15 06:30:00', '2018-06-15 06:30:00'], 
        ['between', 'start_time', '2018-06-15 06:30:00', '2018-06-15 06:30:00']
    ]);
    
您需要登录后才可以回复。登录 | 立即注册