如何 运行 在更新 table 之后触发,然后 运行 在同一个 table 中更新语句

how to run trigger after update table then running statement update in same table

我有 table machine 并且我想创建触发器,条件是当 table machine 更新触发器时 运行ning脚本再次更新 table machine where field status_1 = '' OR status_2 = ''

CREATE TRIGGER `update_machine` AFTER UPDATE ON `machine`
FOR EACH ROW 
UPDATE `machine` 
SET `status_1`='disabled',`status_1`='disabled' 
WHERE `status_1`='' OR `status_2`=''

但是错误说

1442 - 无法更新存储 function/trigger 中的 table 'machine',因为它已被调用此存储 function/trigger.

的语句使用

但是我怎么还能运行这个触发器呢?

触发器无法更新同一行的另一行 table。

执行此操作的典型方法是创建一个存储过程来更新您的 table,然后更新相同 table.

的其他行