Jump to content

[SOLVED] What do you us whenever you need to assign a modified time/date stamp to a mysql


mm00re

Recommended Posts

well I thought it was simple but I have a record in my database that I want to reflect modification date and time, I have a field called LastMod, anytime I modify a record this field is updated along with the rest of the fields in the update script to show when something was modified.

Link to comment
Share on other sites

If you create a DATETIME file in a mysql table it is my understanding that this field is automatically updated whenever a change is made to the record that contains that field.  So really, if that is the case...you do not need a PHP function to give you the proper date and time.  Just create a field and make it of type DATETIME and then make a chance to the record and see if that field is updated automatically. 

 

Carlos

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.