如果我从另一个表中检索包含关闭时间的场所列表,如下所示:
$fullDate = date('Y-m-d H:i:s');
$query="SELECT
venues.ID,
venues.VENUE_NAME,
locations.LOCATION,
hrs.opening_day,
hrs.opening_time,
hrs.closing_time
FROM venues
INNER JOIN venue_types
ON venues.VENUE_TYPE = venue_types.ID
INNER JOIN locations
ON venues.VENUE_LOCATION = locations.ID
INNER JOIN hours_of_operation hrs
on hrs.venue_id = venues.id
and ((hrs.opening_day=date_format('$fullDate' - INTERVAL (closing_time<opening_time and time('$fullDate')<closing_time) DAY, '%a')))
GROUP BY venues.VENUE_NAME";
我得到了我已经指定了特定日期的开放/关闭时间的场所的结果hours_of_operation
。无论hours_of_operation
那一天的行是否为空,我将如何显示所有场地?
谢谢!:)