I have a table containing user created data, and once this data is 30 days old id like to delete it from my database.
Whent the data is uploaded initially i add date(Y-m-d); to my database, however i cant get my head around how to add 30 days to this and check it.
so, i was considering creating another field to hold a unix timestamp when the data is uploaded, then simply seeing if this field was less than the current timestamp minus 2592000 (30 days in seconds).
Can anyone help me do this a better way?
Or is the timestamp method fine?