If you want to generate timestamp automatically in your table,
save a field as timestamp, and default valur is CURRENT_TIMESTAMP.
CREATE TABLE `news` (
`nid` int(10) NOT NULL auto_increment,
`ntitle` varchar(255) NOT NULL default '',
`ctime` timestamp NOT NULL default CURRENT_TIMESTAMP,
`active` int(1) NOT NULL default '0',
`ndesc` text NOT NULL,
PRIMARY KEY (`nid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table product_slide add ctime timestamp NOT NULL default CURRENT_TIMESTAMP;
ReplyDeletemysql> alter table suppliers change pdate pdate timestamp not null default CURRENT_TIMESTAMP;
ReplyDelete