0
我有一個每週發生在不同日子的事件列表。 我希望我的查詢返回按今天開始的星期幾排序的結果。mySQL ORDER BY DAYOFWEEK從今天開始
'Meeting_Day' = Sunday, Monday, Tuesday...
'Day_of_Week' = 1, 2, 3...
SELECT Meeting_Day, Day_of_Week,
Day_of_Week + (Day_of_Week - DAYOFWEEK(NOW())) as x FROM `meetings` ORDER BY x
這可能很簡單,但我不是專業人士。