mysql 无候选框_MySQL:当前选择不包含唯一列。网格编辑,复选框,编辑,复制和删除功能不可用...

bd96500e110b49cbb3cd949968f18be7.png

I have read all the posts regarding my issue in SO. But nothing fixed this.

Issue:

When runs the mentioned query, below warning appears.

Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.

Below is my query.

SELECT ST.stock_code, S.supplier_name, I.item_name, P.avail_qty, SL.unit_price, P.expire_date

FROM purchase_items P

INNER JOIN stock ST ON P.stock_id = ST.stock_id

INNER JOIN suppliers S ON ST.sup_id = S.sup_id

INNER JOIN items I ON P.item_id = I.item_id

INNER JOIN sales SL ON P.item_id = SL.item_id

WHERE (P.expire_date > (NOW() + INTERVAL 1 MONTH))

purchase_items table

qa674.png

解决方案

I faced same problem when I use VIEW and looks like it's phpmyadmin just can't prove that there are columns in resulting query that unique by table design. In your case it's stock_id, but since there is multiple table join and stock_id is not present in other rows it is unable to deside what row shoild be affected on edit or delete.

This warning could be disabled via config

$cfg['RowActionLinksWithoutUnique'] = true

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值