PDA

View Full Version : MySQL expire datas



The_Aegidius
January 29th, 2011, 05:11 PM
Is there any option to auto-delete some rows with some values, after some time in a MySQL database?

slavik
January 30th, 2011, 12:53 AM
only if you track additions with a timestamp and have a scheduled job to do it.

The_Aegidius
January 30th, 2011, 10:56 AM
I found this (http://dev.mysql.com/doc/refman/5.0/en/triggers.html), but I realize that the best way to do it, in my case, is with a PHP script.

Anyway, thanks for helping.