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 "Matt Stone" on 11/23/05 15:50

----- Original Message -----
From: "twistednetadmin" <twistednetadmin@gmail.com>
To: <php-general@lists.php.net>
Sent: Wednesday, November 23, 2005 7:02 AM
Subject: [PHP] Autodeleting news when it has become yesterdays news


>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
>s 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?


Yup,

DELETE FROM your_table WHERE date_column = curdate() -1;

Cheers
Matt

 

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

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