MySQL Forums
Forum List  »  Newbie

Round Robin by date
Posted by: Egor Grijuc
Date: February 07, 2014 08:10AM

Hi.

I am wondering is there a way to keep data in table for exact period.
For example, keep calls data for period of 4 months and when some record reaces
his limit-perform a delete.
For example date now is 2014-02-07 12:00:00
A table have a record with date column and date is 2013-11;07 12:00 so it
needs to be deleted.

The only idea, that i have is a trigger or stored procedure that will be started
from cron and performing a delete where date <= DATE_SUB(NOW(), INTERVAL 4 monts); or something like that...

But i don't like cron jobs.
Is there another way to this without cronjobs but in automated mode?
Thanks

Options: ReplyQuote


Subject
Written By
Posted
Round Robin by date
February 07, 2014 08:10AM
February 07, 2014 11:19AM
February 07, 2014 07:21PM
February 12, 2014 03:21AM
February 12, 2014 08:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.