返回列表 发帖

[软件故障] You have an error in your SQL syntax; check...near 'USING BTREE ) ...的解决方法

现象:在使用帝国备份王恢复DEDECMS数据库时,提示错误:
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 'USING BTREE ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=gbk' at line 13
CREATE TABLE `dede_payment` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `code` varchar(20) NOT NULL DEFAULT '', `name` varchar(120) NOT NULL DEFAULT '', `fee` varchar(10) NOT NULL DEFAULT '0', `description` text NOT NULL, `rank` tinyint(3) unsigned NOT NULL DEFAULT '0', `config` text NOT NULL, `enabled` tinyint(1) unsigned NOT NULL DEFAULT '0', `cod` tinyint(1) unsigned NOT NULL DEFAULT '0', `online` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) USING BTREE ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=gbk
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 'USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=gbk' at line 7
CREATE TABLE `dede_purview` ( `mid` mediumint(8) DEFAULT '0', `typeid` smallint(5) DEFAULT '0', `rank` smallint(6) DEFAULT NULL, `pkey` varchar(30) CHARACTER SET latin1 NOT NULL, `pvalue` text NOT NULL, KEY `pkey` (`pkey`) USING BTREE ) ENGINE=MyISAM DEFAULT CHARSET=gbk

原因:MySQL数据库版本不同,在建表的一些修饰符选项有不同,如 USING BTREE及ENGINE=MyISAM等,可参考相同版本的手册进行修改,或忽略这些选项就可以了。
解决:dede_payment_1.php及dede_purview_1.php中,去掉USING BTREE即可。
欢迎光临:逐梦论坛

返回列表

Powered by Discuz! 7.2   论坛QQ群:逐梦论坛群

© 2001-2021 Comsenz Inc. 鲁公网安备 37120302000001号