Is it true that the following line will delete every event in the table that happend yesterday ?
delete from events where date(event_date) < CURDATE() - INTERVAL 1 DAY;
if not, how can i delete the events that happend yesterday ?
Is it true that the following line will delete every event in the table that happend yesterday ?
delete from events where date(event_date) < CURDATE() - INTERVAL 1 DAY;
if not, how can i delete the events that happend yesterday ?
No, your query deletes all events older than yesterday. To delete only the events yesterday do
delete from events
where date(event_date) = CURDATE() - INTERVAL 1 DAY;