As shown in the following table you need to assign the table details and the table parameters and then you need to set the timestamp on the fields you want to have the timestamp.
Code:
CREATE TABLE IF NOT EXISTS `staff` (
`idstaff` mediumint(8) unsigned NOT NULL auto_increment,
`name` varchar(45) default NULL,
`username` varchar(45) NOT NULL,
`password` varchar(45) default NULL,
`role` varchar(20) default NULL,
`lastchange` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`idstaff`,`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
Bookmarks