逐梦论坛's Archiver

shillan 发表于 2013-9-1 17:08

You have an error in your SQL syntax; check...near 'USING BTREE ) ...的解决方法

[b]现象:[/b]在使用帝国备份王恢复DEDECMS数据库时,提示错误:
[quote]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[/quote]
[quote]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[/quote]
[b]原因:[/b]MySQL数据库版本不同,在建表的一些修饰符选项有不同,如 USING BTREE及ENGINE=MyISAM等,可参考相同版本的手册进行修改,或忽略这些选项就可以了。
[b]解决:[/b]dede_payment_1.php及dede_purview_1.php中,去掉USING BTREE即可。

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.