Difference between revisions of "Website Clear Down DPCalendar Events"

From CCCWiki
Jump to: navigation, search
(Created page with "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 [https://212.227.59.105:8...")
(No difference)

Revision as of 22:23, 10 July 2015

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 < '2015-07-01') 
 				OR (original_id = -1 AND '2015-07-01' > 
 				(SELECT MAX(end_date) FROM ccc_dpcalendar_events  WHERE original_id = e.id))
 	) x
 )