INSERT INTO ... SELECT ... ON DUPLICATE KEY

0

I need to know what could be wrong with this query:

INSERT INTO 'turnos_enviados'('rut','hora_envio', 'turnos')
SELECT "12345678", 'hora_envio'+1, "string cualquiera"
FROM 'turnos_enviados' ORDER BY 'hora_envio' ASC LIMIT 1
ON DUPLICATE KEY UPDATE 'rut'="12345678", 'hora_envio'=(SELECT 'hora_envio'+1 FROM 'turnos_enviados' ORDER BY 'hora_envio' ASC LIMIT 1), 'turnos'="string cualquiera";

Well, he throws me these errors:

The issue is that everything works perfectly, without errors when I execute the query, even the ON DUPLICATE KEY UPDATE is good.

Maybe it's an error of the PHPMyAdmin, but if not, maybe I'm doing something wrong that at some point may fail, that only bothers me even if it works perfect.

Is everything really fine?

    
asked by Roberto Sepúlveda Bravo 08.11.2016 в 05:34
source

1 answer

1

Indeed, there seems to be a flaw in a past version of phpMyAdmin that caused this with the expression ON DUPLICATE KEY specifically: link .

You can try to update the phpMyAdmin you use. In any case, do not worry, your query will work well no matter what phpMyAdmin says. It's a cosmetic problem no more.

    
answered by 08.11.2016 / 05:39
source