New version of PHPMyAdmin has stopped me being able to edit data(新版本的 PHPMyAdmin 使我无法编辑数据)
问题描述
PHPMyAdmin 刚刚被我的服务器管理员升级到 v4.0.4.2.
PHPMyAdmin has just been upgraded by my server admin to v4.0.4.2.
现在我无法编辑下表中的行:
Now I am unable to edit rows in the following table:
CREATE TABLE IF NOT EXISTS `product_options` (
`product_id` int(10) NOT NULL,
`option_id` int(10) NOT NULL,
KEY `product_id` (`product_id`,`option_id`)
)
PHPMyAdmin 仅在我浏览表中的数据时返回此错误消息:
PHPMyAdmin just returns this error message when I browse data in the table:
此表不包含唯一列.网格编辑、复选框、编辑、复制和删除功能不可用.
我不想在此表中使用唯一的列,那么如何编辑数据?有我可以更改的设置吗?
I don't want a unique column in this table, so how can I edit data? Is there a setting I can change?
非常感谢
MySQL v5.1.70
MySQL v5.1.70
编辑/解决方案
我意识到它不一定是一个新的 唯一列
PHPMyAdmin 希望我创建,而是一个 唯一索引
.这意味着我的表的结构不必更改 - 我只需要添加一个唯一索引,无论如何我应该这样做.
I realised that it wasn't necessarily a new unique column
PHPMyAdmin was wanting me to create, but instead a unique index
. This means that the structure of my tables didn't have to change - I just had to add a unique index, which I should have been doing anyway.
推荐答案
如果没有唯一键,就无法区分可以存在的两个相同记录.因此 phpMyAdmin 不能安全地编辑表格 - 您不知道哪些最终会被编辑.你真的想在这个表中有重复的记录吗?
Without unique key, there is no way to differentiate between two same records which can exists. Therefore phpMyAdmin can not safely edit the table - you have no clue which of these would end up edited. Do you really want to have duplicate records in this table?
这篇关于新版本的 PHPMyAdmin 使我无法编辑数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:新版本的 PHPMyAdmin 使我无法编辑数据


- SQL 临时表问题 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 更改自动增量起始编号? 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01