MySQL创建表问题

来源:百度知道 编辑:UC知道 时间:2024/09/20 14:52:18
根据时间段生成不同表,并且表名中带有时间 如20080101
只是sql 语句

你的意思是不是要程序里面建表??
那你大可以直接写呀,比如这样:
$sql="create table {$表名}";
$sql.="(id int not null auto_increment primary key,";
$sql.="time varchar(20),";
$sql.="name varchar(20),";
$sql.="title varchar(50),";
$sql.="messages text)";
echo "$sql \n";
$out=mysql_query($sql);