You are here: Re: Database "pruning" tool? « MySQL Databases « IT news, forums, messages
Re: Database "pruning" tool?

Posted by Michael B. Trausch on 07/08/05 20:18

Andy in NJ wrote:
>
> Would you care to elaborate on this? I am only a little familiar with MySQL,
> having figured out most of it on my own.
>

You can have a field that is of type TIMESTAMP and have the default
value be "ON UPDATE CURRENT_TIMESTAMP". You can then use a UNIX cron
job to execute an SQL script that would SELECT and subsequently DELETE
rows that fit the critera that you specify.

There are a million other solutions, too. This one works on MySQL 4.1
and above, but I do not think anything prior to it. However, you can
also write time to a field when you create the row with your script and
then use the SQL script to search and delete for that.

- Mike

 

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

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