I have a field in a sql database called time_stamp that timestamps when the record was added to the database. I have another field called 'TTL', which will have either 1, 2, or 3 stored in it (each number within this field represents a day). Can I have a php script where the deletion of the record is determined by the 'TTL' field?
For instance a record is added at noon today, with a 'TTL' of 2, can I have a script that deletes that same record at noon two days from now?
What would be the best way to do this, and do I really need both fields to execute this?