SalientAnimal Posted June 20, 2012 Share Posted June 20, 2012 Hi All, Yes I'm becoming a frequent poster... Hope I get my voyager miles . Ok but on a more serious note, I'm hoping to get some direction on this. I have a form that submits to the tables in the database. It is capturing the system date in a field named sys_date. At a later stage this task is updated by an user with an administrator function, I would like that when the administrator does the update a new system date is captured, keeping the existing one. The reason I want to do this is so that I can track turn around times. Can anyone give me an idea of how to do this? Quote Link to comment https://forums.phpfreaks.com/topic/264509-capture-two-different-system-dates/ Share on other sites More sharing options...
requinix Posted June 20, 2012 Share Posted June 20, 2012 So if you want to keep the existing one, where is the new one supposed to go? Quote Link to comment https://forums.phpfreaks.com/topic/264509-capture-two-different-system-dates/#findComment-1355611 Share on other sites More sharing options...
Jessica Posted June 20, 2012 Share Posted June 20, 2012 You need a date_created and a date_modified field. Quote Link to comment https://forums.phpfreaks.com/topic/264509-capture-two-different-system-dates/#findComment-1355612 Share on other sites More sharing options...
SalientAnimal Posted June 21, 2012 Author Share Posted June 21, 2012 Yip, I have a column in the table which is the sys_date and then I have a date_modified. I just need to know how would I get the date_modified to populate in the form update without the administrator being able to modify/minipulate this date. Basically the modified date must also be a system generated date. Quote Link to comment https://forums.phpfreaks.com/topic/264509-capture-two-different-system-dates/#findComment-1355670 Share on other sites More sharing options...
xyph Posted June 21, 2012 Share Posted June 21, 2012 Are you looking for a database-specific solution? MySQL: UPDATE tablename SET col1 = 'value', col2 = 'foobar', date_modified = NOW() WHERE orderid = '12345' Quote Link to comment https://forums.phpfreaks.com/topic/264509-capture-two-different-system-dates/#findComment-1355674 Share on other sites More sharing options...
SalientAnimal Posted June 21, 2012 Author Share Posted June 21, 2012 Thanks Xyph, that was exactly what I was looking for. Strange how sometimes you can do the impossible but the easy stuff you forget or plain and simply just don't think about it . Quote Link to comment https://forums.phpfreaks.com/topic/264509-capture-two-different-system-dates/#findComment-1355683 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.