AV1611 Posted February 5, 2008 Share Posted February 5, 2008 Is there some variable that I can query from MySQL directly that will tell me the last time a record was edited? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/89579-time-of-last-edit/ Share on other sites More sharing options...
fenway Posted February 5, 2008 Share Posted February 5, 2008 You can simply add a modified column and store NOW() whenever it's changed. There's a TIMESTAMP magic feature too, but I would advise against it. Quote Link to comment https://forums.phpfreaks.com/topic/89579-time-of-last-edit/#findComment-458930 Share on other sites More sharing options...
AV1611 Posted February 5, 2008 Author Share Posted February 5, 2008 So, there is no way to tell when a given record was last edited, only when the table with show status command. The question is larger. Basically, I'm trying to "retrofit" an application that tracks jobs. Once the job is closed, it can bet edited again if there is a change (sorry, not my design) and I need to write a cron that emails a list of what jobs have been changed since they were status as closed so everyone knows it's open again. Hmmm... I got an idea... The job is status closed when the "status" field is populated with a date. (It's blank until then) Maybe I can write a clause that says any time a record is edited, if the field is not blank, then blank it and send the email at that time. Makes more sense to me that you Quote Link to comment https://forums.phpfreaks.com/topic/89579-time-of-last-edit/#findComment-458946 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.