$sql="create table xinxi( id int not null auto_increment, title varchar(250) not null, content text not null, shijian timestamp NOT NULL default '0000-00-00 00:00:00', primary key(id))";
$sql="create table xinxi( id int not null auto_increment, title varchar(250) not null, content text not null, shijian datetime NOT NULL default '0000-00-00 00:00:00', primary key(id))";$sql="create table xinxi( id int not null auto_increment, title varchar(250) not null, content text not null, shijian datetime NOT NULL default '".date(Y-m-j)."', primary key(id))";
string date ( string format [, int timestamp]) 返回将整数 timestamp 按照给定的格式字串而产生的字符串。如果没有给出时间戳则使用本地当前时间。换句话说,timestamp 是可选的,默认值为 time()。
id int not null auto_increment,
title varchar(250) not null,
content text not null,
shijian timestamp NOT NULL default '0000-00-00 00:00:00',
primary key(id))";
id int not null auto_increment,
title varchar(250) not null,
content text not null,
shijian datetime NOT NULL default '0000-00-00 00:00:00',
primary key(id))";$sql="create table xinxi(
id int not null auto_increment,
title varchar(250) not null,
content text not null,
shijian datetime NOT NULL default '".date(Y-m-j)."',
primary key(id))";
返回将整数 timestamp 按照给定的格式字串而产生的字符串。如果没有给出时间戳则使用本地当前时间。换句话说,timestamp 是可选的,默认值为 time()。
别的方法还是一样的结果0000_00_00 00:00:00。
各位高手还有什么好办法吗?谢了!