Jump to content

MySQL function need onupdate?????


judd48

Recommended Posts

In theory, you the first TIMESTAMP column in table automatically gets updated with the current date/time whenever a new row is inserted/updated without its value being specified explicity. However, in practice, I think it's a terrible idea -- it's much simpler to just include "NOW()" in your INSERT/UPDATE query, and it allows you to have a proper DATETIME column as well. They did make some minor improvements in MySQL 5, but it's still a bad idea. Go the easy route, no fancy columns, easy SQL statements to achieve your goal.

 

Hope that helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.