I have a MySql table for news on the site
the date the news is inserted goes in  column      news_date
the text of the news itself, goes in column    league_news

I want to DELETE all news older than 7 days
I looked in the MySql documentation at the date functions and tried the
following but it produced an error ...help?

Delete league_news
FROM leagues
WHERE TO_DAYS(NOW()) - TO_DAYS(news_date) >= 7

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to