Programming question
How to handle auto delete posts in mysql ?
i am working on webapp where users upload pics and choose expire date in future e.g. 10 minutes, 1 hour, 1 day, 1 month, 6 months, 1 year from the date of post creation.
How can i delete only those posts which are set for auto delete and whose date is expired ?
i can think of many ways., but cant decide which one to choose .
obviously cron job every minute will delete the expired posts.,
so should i save post_creation_date and post_expiration_date in datetime format or in unix timestamp format.
Thanks for your time.
i need logic, i can code mysqlf.
anybody ?
|