Jump to content

Getting the latest update time


RyuHendrabusa

Recommended Posts

Hello all,

I just joined this forum because I am a beginner in php programming  :)

 

Need to ask the seniors here on how to get the latest update time to a particular field in MYSQL database. What I had in mind was to create a field last_update in my users table, then use this field to find out the last updated time.

 

Being a total beginner at PHP and I need to complete this task for a job, it'll be really nice to get help on how can I go about accomplishing this task.

 

Thanks a lot everyone :)

Link to comment
https://forums.phpfreaks.com/topic/162859-getting-the-latest-update-time/
Share on other sites

http://dev.mysql.com/doc/refman/5.0/en/timestamp.html

 

If you define a column as a mysql TIMESTAMP data type, it can be defined to be set to the current datetime on an INSERT or an UPDATE.

 

Thanks for helpin a noobie out! :)

 

Is there anyway for me to make this TIMESTAMP column monitors only when one particular field gets updated? I have a contribution points column in my table and I want to keep track of the contribution points a member has made, and if it is recent, I would not fire off the queries again.

Is there anyway for me to make this TIMESTAMP column monitors only when one particular field gets updated? I have a contribution points column in my table and I want to keep track of the contribution points a member has made, and if it is recent, I would not fire off the queries again.

Uh... say what? ???

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.