解决方法:此表不包含唯一列。网格编辑,复选框,编辑,复制和删除功能不可用 [英] Resolution: This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available

查看:5165
本文介绍了解决方法:此表不包含唯一列。网格编辑,复选框,编辑,复制和删除功能不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这不是一个问题,而是一个自我生成的问题/问题和解决方案,我发现工作。

This is not a question but a self generated problem/question and solution that I found working. I thought it would be decent courtesy to share since there was not a complete working solution I could find.

phpMyAdmin中生成的错误是:

The error generated in phpMyAdmin is:

此表格不包含唯一的列。网格编辑,复选框,编辑,复制和删除功能不可用。

"This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available."

例如,只要您的所有AI或唯一标识符字段都是唯一的,您就可以简单地更改表,并确保这是主键,并设置为唯一值。

For example, as long as all of your AI or Unique identifier field are unique then you can simply alter the table and ensure this is the Primary key and set to unique value.

我使用此解决方案在我的一个表上解决了这个问题。

I solved this with this solution on one of my tables.

另一个表有多个AI int值,这是主要字段,但有多个同一类型的值。

The other table had multiple AI int values that were the Primary field, but there were multiple values of the same kind.

简单的解决方法是在表的末尾添加一列作为Unique AI Int。基本上所有的MySQL都说是每个记录中需要一个唯一的值来区分行。

The simple fix for this was to just add a column to the end of the table as Unique AI Int. Basically all MySQL is saying is it needs a unique value in each record to differentiate the rows.

希望这是有帮助的。

推荐答案

这不是一个错误。 PhpMyAdmin只是通知你,在结果集中没有唯一的ID列。根据您发送的查询类型,这是所需的行为。

This is not an error. PhpMyAdmin is just informing you, that there is no unique ID column in your result set. Depending on the type of query you sent, this is the desired behaviour.

这不是MySQL说它需要一个唯一的ID,如果任何组合的列您的结果集是唯一的,那些列的值可以在UPDATE或DELETE查询中使用。它是phpMyAdmin,它说它没有足够的信息,为您提供通常在具有唯一ID的结果集中看到的复选框和按钮。

It is not MySQL which is saying it needs a unique ID, if any combination of the columns in your result set is unique, the values of those columns can be used in an UPDATE or DELETE query. It is phpMyAdmin which says it does not have enough information to offer you the checkboxes and buttons you will normally see in a result set with unique ID.

这篇关于解决方法:此表不包含唯一列。网格编辑,复选框,编辑,复制和删除功能不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆