MySQL Forums
Forum List  »  Chinese

MySQL 如何根据日期时间来实现数据的自动更新?
Posted by: bairaulinter
Date: December 23, 2006 01:23AM

我现在有一张表: Product

productID long
name varchar
createTime Datetime
days int
valide tinyint

当一件商品的记录创建以后,有一个创建时期,还有一个过了多少天后无效。
那么MySQL是否提供一种功能当过了days那么多天后,自动将valide字段设置为无效(0)?

谢谢!



Edited 1 time(s). Last edit at 12/23/2006 01:24AM by bairaulinter.

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL 如何根据日期时间来实现数据的自动更新?
50988
December 23, 2006 01:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.