I have the following query:
UPDATE cp_feedback_trabalho as a SET
a.visivel = 1
WHERE a.dhEnvio IS NOT NULL AND EXISTS (
SELECT
b.id
FROM cp_feedback_trabalho as b
WHERE
b.id_pessoa_que_enviou = a.id_pessoa_que_recebeu AND
b.id_pessoa_que_recebeu = a.id_pessoa_que_enviou AND
b.id_projeto = a.id_projeto AND
b.dhEnvio IS NOT NULL
)
I get the following error when executing:
# 1093 - You can not specify target table 'a' for update in FROM clause
What could be wrong?