MERGE
no es compatible con MySQL
, El equivalente para eso es
INSERTAR... EN LA ACTUALIZACIÓN DE CLAVE DUPLICADA
Prueba esto,
INSERT INTO tableName (email, secret, passwd, ts, newAcct)
VALUES ($1,$2,$3,$4,TRUE)
ON DUPLICATE KEY UPDATE newAcct=TRUE, existingUser=NULL, secret=$2, ts=$4
pero asegúrese de email
se establece como Primary Key
o Unique
.