【问题标题】:Infractions for Radipanel SQL query errorRadipanel SQL 查询错误的违规行为
【发布时间】:2012-07-27 06:13:03
【问题描述】:

这就是我输入的内容!

ALTER TABLE users ADD totalInfractions INT(1) NOT NULL DEFAULT '0', ADD totalWarnings INT(1) NOT NULL DEFAULT '0', ADD bannedINT(1) NOT NULL DEFAULT' 0'; INSERT INTO menu (id, text, url, resource, usergroup, protected, weight) 值 (NULL, 'Add infraction', 'infraction.add', '_res/infraction/add.php', '5', ' 0', '0'); INSERT INTO menu (id, text, url, resource, usergroup, protected, weight) 值 (NULL, 'Remove infraction', 'infraction.remove', '_res/infraction/remove.php', '5', ' 0', '0'); INSERT INTO menu (id, text, url, resource, usergroup, protected, weight) VALUES (NULL, 'View infraction log', 'infraction.viewLog', '_res/infraction/view.php', '5', '0', '0'); INSERT INTO menu (id, text, url, resource, usergroup, protected, weight) VALUES (NULL, 'Clear infraction log', 'infraction.clearLog', '_res/infraction/clear_log.php', '5', '0', '0'); INSERT INTO menu (id, text, url, resource, usergroup, protected, weight) VALUES (NULL, '查看我的违规日志', 'user.viewMyLog', '_res/infraction/view_mine.php', '1' , '0', '0'); 创建表infraction_logidINT(255)非空自动增量主键,usernameVARCHAR(255)字符集latin1排序latin1_general_ci非空,reasonVARCHAR(255)字符集非拉丁1,NULL 987654334 @ varchar(100)字符集latin1 collat​​ate latin1_general_ci not null,@ varchar(3)字符集拉丁语1 collat​​ate latin1_general_ci not null,@ 5087654336 @ varchar(100)字符集latin1 collat​​e latin1_general_ci not null not null,timestamp timestamp(255 ) ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE = MYISAM;


这是错误

ALTER TABLE users ADD totalInfractions INT(1) NOT NULL DEFAULT '0', 添加totalWarnings INT(1) NOT NULL DEFAULT '0', 添加banned INT(1) NOT NULL DEFAULT '0';

MySQL 说:

1060 - 列名“totalInfractions”重复

【问题讨论】:

    标签: mysql


    【解决方案1】:

    错误信息很清楚:

    重复的列名“totalInfractions”

    您正尝试向您的表中添加一个列,该列的名称与另一列已有的名称相同。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-03-23
      • 1970-01-01
      • 1970-01-01
      • 2015-11-14
      • 2013-08-10
      • 2016-10-13
      • 1970-01-01
      相关资源
      最近更新 更多