I have an existing calendar/events table that I use to keep track of single and multi-day events. However I need to be able to also have recurring events also.
Now we don't have to add recurring events to this table. I could select out of both tables to grab my calendar/events data. I'm just really confused on the best way to setup db/coding for recurring events.
Here is my current table structure for events
Or should I just insert a new record into the events table for each recurring event? seems like a bunch of work though on editing, adding, and deleting recurring events.
-- -- Table structure for table `calendar_events` -- CREATE TABLE IF NOT EXISTS `calendar_events` ( `event_id` int(11) NOT NULL AUTO_INCREMENT, `site_id` int(11) DEFAULT NULL, `creator_id` int(11) DEFAULT NULL, `created` date DEFAULT NULL, `last_modified_id` int(11) DEFAULT NULL, `last_modified` date DEFAULT NULL, `title` varchar(100) DEFAULT NULL, `visible` smallint(6) DEFAULT NULL, `start_date` date DEFAULT NULL, `end_date` date DEFAULT NULL, `start_time` time NOT NULL, `end_time` time NOT NULL, `content` text NOT NULL, `location` varchar(255) NOT NULL, `ministry_id` int(11) NOT NULL, PRIMARY KEY (`event_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;