ShootingBlanks Posted November 21, 2007 Share Posted November 21, 2007 Hello. In phpMyAdmin, I have a row in a table with the following specs: * Field (name): updated * Type: Timestamp * Coallition: (empty) * Attributes: (empty) * Null: No * Default: CURRENT_TIMESTAMP * Extra: (empty) However, anytime I update a record, the "updated" field stays as the creation date of the record (not the current date). What could I be doing wrong here? What other information is needed for me to get help on this? Thanks!!! Link to comment https://forums.phpfreaks.com/topic/78256-solved-default-column-set-to-current_timestamp-but-not-updating/ Share on other sites More sharing options...
revraz Posted November 21, 2007 Share Posted November 21, 2007 May want to post in the mysql forums http://www.phpfreaks.com/forums/index.php/board,3.0.html If you suspect your php code, then post that instead so it can be reviewed Link to comment https://forums.phpfreaks.com/topic/78256-solved-default-column-set-to-current_timestamp-but-not-updating/#findComment-396000 Share on other sites More sharing options...
Glyde Posted November 21, 2007 Share Posted November 21, 2007 ALTER TABLE table_name MODIFY updated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; Link to comment https://forums.phpfreaks.com/topic/78256-solved-default-column-set-to-current_timestamp-but-not-updating/#findComment-396007 Share on other sites More sharing options...
ShootingBlanks Posted November 21, 2007 Author Share Posted November 21, 2007 Thanks! - that worked!!! Link to comment https://forums.phpfreaks.com/topic/78256-solved-default-column-set-to-current_timestamp-but-not-updating/#findComment-396020 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.