[英]Update query does not update row(s)
I'm struggling with a very basic query. 我正在尝试一个非常基本的查询。 I can not see what I'm doing wrong.
我看不到我在做什么错。
Here is the first query I tried: 这是我尝试的第一个查询:
UPDATE `qrm_logs` SET `billable` = '0' AND `invoice_id` = NULL WHERE `id` = '842'
And the second: 第二个:
UPDATE `qrm_logs` SET `billable` = 0 AND `invoice_id` IS NULL WHERE `id` = '842'
Column billable
has type enum
. 列
billable
具有类型enum
。 Column invoice_id
is an int
type. 列
invoice_id
是int
类型。 Also, invoice_id can be nullable. 另外,invoice_id可以为空。
What causes this problem? 是什么导致此问题?
Should be: 应该:
UPDATE `qrm_logs` SET `billable` = 0, `invoice_id` = NULL WHERE `id` = 842
note the comma instead of the AND. 请注意逗号而不是AND。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.