[英]SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)
First, I know what this error means, but I don't understand why it's appearing. 首先,我知道此错误的含义,但我不明白为什么会出现此错误。 I use this query to update data (it is select generated by framework).
我使用此查询来更新数据(它是由框架选择生成的)。
UPDATE `achievement` SET `name`='OKer', `description`='sadsad',`IdAchievement`='2' WHERE (`IdAchievement`, '2')
I have these records in my database: 我的数据库中有以下记录:
IdAchievement | IdAchievement | name |
名称| description |
描述| IdGame
IdGame
1 | 1 | Super achievement|
超级成就| description |
描述| 1
1个
2 | 2 | OK|
OK | sadsad |
sadsad | 1
1个
5 | 5 | dsfs|
dsfs | |
| 1
1个
IdAchievement is a primary key, IdGame is a foreign key to the Game table. IdAchievement是主键,IdGame是Game表的外键。
Can you help me please? 你能帮我吗? I really do not understand it...
我真的不明白...
将查询更改为以下内容:
UPDATE `achievement` SET `name`='OKer', `description`='sadsad',`IdAchievement`='2' WHERE `IdAchievement` = '2'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.