Hello to all. Help advice.
There is a database (MySQL) in which there is a table (events) with a list of events that have a start date (date_start) and an end date (date_end). In addition, some events should have a cyclical nature (the same recording, which is displayed several times, but with different dates, for example, a meeting from 12:00 to 14:00 every Friday (repeat_every = 'week', repeat_day = 5) in the period from 05/01/2016 (repeat_start) until 01.02.2017 (repeat_end)).
Now every day the cron is triggered and creates a copy of the original event a day before its occurrence. The question is how, using SELECT, without creating unnecessary copies and with minimal loss in performance, output events with upcoming dates in a given range.