mysql - 上传 mySQL 文件时出错

标签 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 

最佳答案

您收到此错误是因为您已选择表格的所有列,但前 11 列的值可用,而您错过了最后的 )

此代码将解决您的问题

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

关于mysql - 上传 mySQL 文件时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44357545/

相关文章:

php - CI中如何将多维数组插入数据库?

Java:Windows 中无法识别 File.separator?

mysql - 替换值中的列引用

sql - 这个 SQL 模式有什么问题?

PHP 表单操作不工作并且不更新查询字符串

mysql - 如何将 Rails 应用程序迁移到不同的托管服务提供商

mysql - 导入 CSV 文件时出现问题

php - 使用一个大查询还是多个小查询更快?

php - 限制foreach循环后的查询并保持排序顺序

php - 当页面第一次加载时触发事件,此后没有其他时间