Closed roscom closed 1 year ago
SELECT blog_events.* FROM blog_events INNER JOIN events ON events.id = blog_events.event_id WHERE blog_events.created_at < DATE_SUB(now(),interval events.days_to_keep day)
I got this working on day 1 but had to battle some Heroku weirdness. It should finally be up and live 👍
SELECT blog_events.* FROM blog_events INNER JOIN events ON events.id = blog_events.event_id WHERE blog_events.created_at < DATE_SUB(now(),interval events.days_to_keep day)