运行安装接口程序出现以下错误: You have an error in your SQL syntax; check the manual that corr
新手求教:
改别人写的网站:运行时报错运行安装接口程序出现以下错误:
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 'add smallint NOT NULL default '0', add char(20) NOT NULL default '', add e' at line 2
数据库创建结构是这样的:
function InstallUserCOM(){
global $empire,$ecms_config;
$user_userfen="enewsuserfen";
$user_money="enewsmoney";
$user_salt="enewssalt";
$sql=$empire->query1("alter table ".$ecms_config['member']['tablename']."
add ".$ecms_config['memberf']['groupid']." smallint NOT NULL default '0',
add ".$ecms_config['memberf']['rnd']." char(20) NOT NULL default '',
add ".$user_userfen." mediumint(8) unsigned NOT NULL default '0',
add ".$user_money." float(11,2) NOT NULL default '0.00',
add ".$ecms_config['memberf']['userdate']." int(10) unsigned NOT NULL default '0',
add ".$ecms_config['memberf']['zgroupid']." smallint not null default '0',
add ".$ecms_config['memberf']['havemsg']." tinyint(1) not null default '0',
add ".$ecms_config['memberf']['userkey']." char(12) NOT NULL default '',
add ".$user_salt." char(8) NOT NULL default '',
add ".$ecms_config['memberf']['checked']." tinyint(1) not null default '1';");
if(!$sql)
{
echo"运行安装接口程序出现以下错误:<br><font color=red>".mysql_error()."</font><br><br><a href='index.php'>点击返回重新设置</a>";
exit();
}
db_close();
$empire=null;
echo"<script>self.location.href='index.php?setup=success';</script>";
exit();
}
不知道是哪里有问题求大神帮忙改下,谢谢!