xProteuSx Posted February 1, 2007 Share Posted February 1, 2007 When I create a table in MySQL, how do I go about creating a date/time value, that is updated when 'x' event occurrs. Initially, I want the value to show the date/time value given by the now() function: CREATE TABLE whatever (lastvisit DATETIME 'now()') ???? Link to comment https://forums.phpfreaks.com/topic/36592-solved-datetime-and-now/ Share on other sites More sharing options...
bibby Posted February 1, 2007 Share Posted February 1, 2007 # depending on your version create table blah (lastvisit datetime default current_timestamp); Link to comment https://forums.phpfreaks.com/topic/36592-solved-datetime-and-now/#findComment-174427 Share on other sites More sharing options...
fenway Posted February 1, 2007 Share Posted February 1, 2007 Trust me, you don't want this... handle it yourself. Link to comment https://forums.phpfreaks.com/topic/36592-solved-datetime-and-now/#findComment-174592 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.