2017-06-04 100 views
0

當我用新的答案我上傳了文件,這就是我現在得到的。上傳mySQL文件時出錯

SQL query: 

CREATE TABLE IF NOT EXISTS `games` () INSERT INTO `games` (`name`, `creatorid`, `gameid`, `id`, `plays) VALUES ('בדיקה', 'לא ידוע', 1,1,0) CREATE TABLE IF NOT EXISTS `gamewall` (`userid` int(11) NOT NULL, `reason` text NOT NULL, `comment` text NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `bannedbyid` int(11) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `bans_IP` (`IP` mediumtext NOT NULL, `id` int(11) NOT NULL AUTO_INCREMENT, `bannerid` int(11) NOT NULL, `reason` mediumtext NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; CREATE TABLE IF NOT EXISTS `buysell` (`buysell` int(11) NOT NULL, `sellerid` int(11) NOT NULL, `price` int(11) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `competitions` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` mediumtext NOT NULL, `startedbyid` int(11) NOT NULL, `descripti[...] 

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 ') 

INSERT INTO `games` (`name`, `creatorid`, `gameid`, `id`, `plays) VALUES 
('' at line 3 
+0

如果你不明白只是回覆說你不明白,什麼部分! –

+1

您可以通過點擊問題底部的編輯按鈕編輯您的問題。 – McNets

+1

在繼續使用數據庫之前,請閱讀有關數據庫規範化的內容! https://en.wikipedia.org/wiki/Database_normalization – baao

回答

0

,因爲你選擇了你的表的所有列,但值可用於第一11列和你在過去的

錯過)此代碼將解決您的問題,您收到此錯誤

INSERT INTO `accounts` (
    `Username`, 
    `Password`, 
    `Email`, 
    `salt`, 
    `Reebs`, 
    `online`, 
    `lastOnline`, 
    `lastOnlineMinutes`, 
    `lastOnlineHours`, 
    `status`, 
    `blurb` 
) 
VALUES 
    (
     'AvatarLife', 
     'df3ed1ad53c4cc2f3b5c6bdf04d33a9f094df53b', 
     '[email protected]', 
     'jBqnW?Dk9Epzpg4', 
     '9223372036854775807', 
     '1', 
     '205', 
     '26', 
     '13', 
     '', 
     'Avatar Life is the only good life!')