Thread: Business Programming question
View Single Post
Old 07-25-2018, 02:01 AM  
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
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 ?
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote