Carlos Oulman
Carlos Oulman

Reputation: 21

Deleting MySQL records at a certain time

I have a database set up on a shared hosting plan that has a set of records that I would like to have delete automatically at the date and time that a user has entered into the exptime column. How would I go about setting this up? I am very new to this so I need step by step directions.

Upvotes: 0

Views: 58

Answers (1)

J_D
J_D

Reputation: 681

If you have the ability to use cron, I would set up a php file that selects all the records that are less than or equal to exptime and then delete them, then run that php file either every night, or every minute, or whatever fits your needs

Upvotes: 1

Related Questions