Re: Autodeleting news when it has become yesterdays news

From: Date: Wed, 23 Nov 2005 11:39:32 +0000
Subject: Re: Autodeleting news when it has become yesterdays news
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-226339@lists.php.net to get a copy of this message
I have a news-script on a webpage. Or an eventscript you might call it. This lists up events thats gonna happen on a given day. ie concerts and sportsevents. To get this deleted without having to log on to the adminpage when the event is over would have been a great relief. 1. Is it just as simple as writing a query that executes and removes news with yesterdays date? ------------------------------------------------------------------------- Even simpler, why don't you keep the data instead of deleting it and write a query for the homepage which only displays events whcih occur in the future? 2. And how should I set it to execute if so? If you do want to execute a regular PHP script to delete data for some reason, look into cron (*nix) or task scheduler (windows)

« previous php.general (#226339) next »