Posted by David Grant on 11/23/05 16:06
twistednetadmin wrote:
> Just at the beginning of the page with the news is my thought. So that it
> checks for the eventdate and erases the overdued ones before it collects the
> news.
If you wanted to do that, I'd recommend adding some sort of probability
factor into it, so not all scripts have to run the function.
e.g. 1% chance of cleaning up the database.
<?php
if (rand(1,100) > 99) {
deleteItems();
}
?>
Cheers,
David Grant
[Back to original message]
|