Website Clear Down DPCalendar Events

From CCCWiki
Revision as of 22:23, 10 July 2015 by Marc.maier (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To clear down DPCalendar events that are no longer required. Please follow run the following SQL via the phpAdmin console which is accessible via the Parallel administration panel.

 DELETE FROM ccc_dpcalendar_events WHERE id IN (
 	SELECT id FROM (
 		SELECT id FROM ccc_dpcalendar_events e
 			WHERE (original_id <> -1 AND end_date < '[date, e.g. 2015-07-01]') 
 				OR (original_id = -1 AND '[date, e.g. 2015-07-01]' > 
 				(SELECT MAX(end_date) FROM ccc_dpcalendar_events  WHERE original_id = e.id))
 	) x
 )