views:

212

answers:

1

Is it possible to delete a SQL db row after a period of time?

ie. I have a row that has an expiration date and it needs to be deleted on that day?

If I'm displaying info to a user, is it better practice to just hide "expired" entries and keep the data?

+2  A: 

Either way this looks like a job for cron. Just create a cron job that runs daily that either deletes or hides the rows that expire that day. I prefer to hide them for data retention purposes but deleting them might suit your application better. You'll know better then us.

John Conde