gpt4 book ai didi

mysql - Radipanel SQL 查询错误的违规行为

转载 作者:行者123 更新时间:2023-11-29 14:21:16 24 4
gpt4 key购买 nike

这就是我放入的内容!

ALTER TABLE `users` ADD `totalInfractions` INT( 1 ) NOT NULL DEFAULT '0', ADD `totalWarnings` INT( 1 ) NOT NULL DEFAULT '0', ADD `banned` INT( 1 ) NOT NULL DEFAULT '0';
INSERT INTO `menu` (id, text, url, resource, usergroup, protected, weight) VALUES (NULL, 'Add infraction', 'infraction.add', '_res/infraction/add.php', '5', '0', '0');
INSERT INTO `menu` (id, text, url, resource, usergroup, protected, weight) VALUES (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, 'View my infraction log', 'user.viewMyLog', '_res/infraction/view_mine.php', '1', '0', '0');
CREATE TABLE `infraction_log` ( `id` INT( 255 ) NOT NULL AUTO_INCREMENT PRIMARY KEY, `username` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `reason` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `type` VARCHAR( 100 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `addrem` VARCHAR( 3 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `issuedby` VARCHAR( 100 ) CHARACTER SET latin1 COLLATE latin1_general_ci 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',
ADD `totalWarnings` INT( 1 ) NOT NULL DEFAULT '0',
ADD `banned` INT( 1 ) NOT NULL DEFAULT '0';

MySQL 说:

# 1060 - Duplicate column name 'totalInfractions' 

最佳答案

错误消息非常清楚:

Duplicate column name 'totalInfractions'

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

关于mysql - Radipanel SQL 查询错误的违规行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11706897/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com