Re: automatically delete records from a table

From: Date: Mon, 10 Feb 2003 22:34:06 +0000
Subject: Re: automatically delete records from a table
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135129@lists.php.net to get a copy of this message
--- Sunfire <rusty_81@msn.com> wrote: > i need to have the date and time of the event checked > so when cron runs if the posted event is on 2003-02-11 > 15:00:00 for example then at 24:00:00 that day cron will > delete that record because it isnt needed anymore Work on creating a script that you can run yourself to do this. Don't worry about cron just yet. Cron is not going to help you with any logic; it is only useful for scheduling your script to run on a specific schedule that you determine. So, in PHP, just check each of these "events" and delete any of them that are more than 9 hours old. Once you get that, adding it to cron is a simple matter of syntax. Chris

« previous php.general (#135129) next »