0
I set up an update by grouping the field presenca
which should change two arrays
in a repeat loop, follows the query
:
UPDATE acessos AS a
JOIN
( SELECT usr_id, presenca
FROM acessos
GROUP BY presenca
) AS c
ON a.usr_id = c.usr_id
SET
a.presenca = 1
WHERE a.usr_id = 2
It only works with the usr_id = 10
, what can be?
I arrived at safe_update, with error 1175 that Workbench printed me.
– Fernando Santana