$sql=<<<EOF
DROP TABLE if exists `install`,`user`,`theme`,`reply`;
create table `install` (
`id` int(11) unsigned NOT NULL auto_increment,
`themenum` int(11) NOT NULL,
`webtitle` text NULL,
`weblogo` text NULL,
`webkeywords` text NULL,
`webdescription` text NULL,
`webtop` text NULL,
`webmenu` text NULL,
`webfooter` text NULL,
`custom1` text NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
);
EOF;
$resql=mysql_query($sql);
if($resql){
echo "<div align=center><h1>安装成功!请删除掉安装文件</h1><a href=index.php>查看首页</a></div>";
}
else{
$result=mysql_error();
echo "<div align=center>安装出错!<br>$result</div>";
}
出错信息:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'create table `install` ( `id` int(11) unsigned NOT NULL auto_increment, `the' at line 2