The general outline sounds okay, however
1) I would not use start_date, end_date and duration; you only need two of those. The most obvious would be to just use start_date and duration. You can calculate end_date from that. The problem with storing all three is that you can get update anomalies. For example if you increase the duration but not the end_date the record doesn't make sense any more.
2) Don't use both timezone and start_hour, just use timezone. Same reasoning as (1).
3) I would combine the last bit in one query
Code:
UPDATE courses SET today_status='incomplete' WHERE status='active' AND something_with_timezone_here
4) Don't use SELECT * , only select the fields you need
5) Subtract -1 is the same as "add 1", I don't think that's what you were going for
Bookmarks