所以,我有一个页面,我想列出一周的所有日子和当天活动的酒吧。有些日子没有事件,但我仍想列出一周中的哪一天。我应该如何在我的mysql数据库中设置它?
答案 0 :(得分:0)
SELECT
w.week_day
, e.pub_id
, e.event
FROM
weekday AS w
LEFT JOIN
event AS e
ON e.day_of_week_number = w.week_number
AND e.pub_id = @search_this_pub_id
ORDER BY
w.week_number