ted_chou12 Posted January 2, 2007 Share Posted January 2, 2007 What I want this column of mysql table to store is users last login time, is it the right thing to choose? Link to comment https://forums.phpfreaks.com/topic/32580-solved-whats-on-update-current_timestamp-current_timestamp/ Share on other sites More sharing options...
wildteen88 Posted January 2, 2007 Share Posted January 2, 2007 The column type should be timestamp yes. Then when you update the table you use the CURRENT_TIMESTAMP constant or you can just use PHPs time function which will place a unix timstamp (number of secounds passed since 1 Jan 1970). Then you convert the timestamp into a formatted date by passing the timestamp to the date function as the second parameter. Link to comment https://forums.phpfreaks.com/topic/32580-solved-whats-on-update-current_timestamp-current_timestamp/#findComment-151500 Share on other sites More sharing options...
ted_chou12 Posted January 2, 2007 Author Share Posted January 2, 2007 thanks Link to comment https://forums.phpfreaks.com/topic/32580-solved-whats-on-update-current_timestamp-current_timestamp/#findComment-151502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.