新版本的 PHPMyAdmin 使我无法编辑数据

New version of PHPMyAdmin has stopped me being able to edit data(新版本的 PHPMyAdmin 使我无法编辑数据)
本文介绍了新版本的 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 使我无法编辑数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)