2016-07-21 77 views
0

你好我試圖導入數據庫通過到MySQL,但我得到以下錯誤:的Joomla數據庫導入錯誤

-- 
-- Database: `final` 
-- 
-- --------------------------------------------------------  
-- 
-- Table structure for table `nqjr5_assets` 
--  
CREATE TABLE `nqjr5_assets` (
    `id` int(10) UNSIGNED NOT NULL COMMENT 'Primary Key', 
    `parent_id` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested set parent.`, 
    `lft` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested set lft.`, 
    `rgt` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested set rgt.`, 
    `level` int(10) UNSIGNED NOT NULL COMMENT 'The cached level in the nested tree.', 
    `name` varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n', 
    `title` varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.', 
    `rules` varchar(5120) NOT NULL COMMENT 'JSON encoded access control.' 
) ENGINE=InnoDB DEFAULT CHARSET=utf8; 
MySQL said: Documentation 
#1064 - 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 'AS `Nested set parent.`, 
    `lft` int(11) NOT NULL DEFAULT '0'COMMENT AS `Nested ' at line 13 

回答

0

你的語法是錯誤的。它應該是這樣的

CREATE TABLE nqjr5_assets ( 
 
    id int(10) UNSIGNED NOT NULL COMMENT 'Primary Key', 
 
    parent_id int(11) NOT NULL DEFAULT '0' COMMENT 'Nested set parent.', 
 
    lft int(11) NOT NULL DEFAULT '0'COMMENT 'Nested set lft.', 
 
    rgt int(11) NOT NULL DEFAULT '0'COMMENT 'Nested set rgt.', 
 
    level int(10) UNSIGNED NOT NULL COMMENT 'The cached level in the nested tree.', 
 
    name varchar(50) NOT NULL COMMENT 'The unique name for the asset.\n', 
 
    title varchar(100) NOT NULL COMMENT 'The descriptive title for the asset.', 
 
    rules varchar(5120) NOT NULL COMMENT 'JSON encoded access control.') 
 
    ENGINE=InnoDB DEFAULT CHARSET=utf8;