Skip to content

Instantly share code, notes, and snippets.

@jgdoncel
Created May 8, 2012 13:32
Show Gist options
  • Save jgdoncel/2635022 to your computer and use it in GitHub Desktop.
Save jgdoncel/2635022 to your computer and use it in GitHub Desktop.
MySQL INSERT o UPDATE si existe
INSERT INTO clientes_peticiones (
id_cliente,fecha,peticiones
) VALUES (
1,'2011-11-02',1
) ON DUPLICATE KEY UPDATE peticiones = peticiones+1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment