Apr 20, 2000, 2:55 PM
Veteran / Moderator (6956 posts)
Apr 20, 2000, 2:55 PM
Post #3 of 3
Views: 1850
You can set links up to do just about anything. If you have a field with the expire date, or the date of addition, and you know when you want it to expire, you can run a cron job such as:
DELETE FROM Links WHERE Expire_Date < Now()
If you wanted to put the add-date and expire based on a number of days in the future, you could do something like:
DELETE FROM Links WHERE ADDDATE(Add_Date, INTERVAL 30 DAY)< NOW()
In order to make this work, you might have to convert it all to UNIX_TIMESTAMP() so that you are dealing with a numerical value.
There are probably a dozen different ways to decide what links to get rid of, the point is that you _can_ do it.
You can manually expire from the Admin by running the script or from cron on a daily basis.