我有特定日期的两次检查室.
我尝试跟随两个查询它运行一些时间权限但是,当我选择上午10:00到下午12:00时错误结果意味着不返回任何记录.
QUERY-1:
SELECT 1 FROM `timetable_details` WHERE ( ((`td_from` <= '10:00:00') AND (`td_to` > '10:00:00')) OR ((`td_from` < '12:20:00') AND (`td_to` >= '12:20:00')) ) AND ((`td_room`='1') AND (`td_date`='2016-01-25'))
QUERY-2:
SELECT 1 FROM `timetable_details` WHERE ( (`td_from` > '07:00:00') AND (`td_to` < '08:00:00') ) AND ((`td_room`='1') AND (`td_date`='2016-01-25'))
我有td_id = 4
数字行但不是退货.
提前致谢.