You are here: Re: [PHP] Autodeleting news when it has become yesterdays news « PHP « IT news, forums, messages
Re: [PHP] Autodeleting news when it has become yesterdays news

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация