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()') ???? Quote 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); Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/36592-solved-datetime-and-now/#findComment-174592 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.