in reply to 5 minutes of time

The built-in time fields are automatically updated whenever mySQL creates or updates a record, but it's not always helpful to change the timestamp on update. I generally do what monarch suggests and store the current timestamp from time() in an INT field, allowing me more control over when to update the timestamp.

Replies are listed 'Best First'.
Re^2: 5 minutes of time
by Stoffe (Sexton) on Jun 04, 2005 at 13:55 UTC
    The built-in time fields are automatically updated whenever mySQL creates or updates a record

    That is only TIMESTAMP and only the first one in your table. You still have the DATETIME, DATE and TIME ones to choose from. It also allows you to have several timestamps, one which will always update (a "last modified") and others that only change when you want them too.

    It's all about semantics, really. If you want to store a date or a time, store a DATE or a TIME. If you want to stamp a certain time... Also, it never hurts to read up on what the manuals say instead of reinventing another wheel. As with Perl, you can often assume that good products already have the tools you need, and of better quality. Saves time and enhances overall quality.