I have a database ( basedatos
) and a table ( contratos
) with the following fields:
Id
Nombre
Fecha (timestamp)
Vendedor
Telefono
Gestionado
I want to insert in a php page a button that duplicates the record but with the consecutive Id, the date is timestamp and in the nombre
field I concatenate the value that already has with R . That is, if the field nombre
is originally "Pedro", now the new record will be "Pedro R ".
I tried:
INSERT INTO TABLA1 (CAMPO1, CAMPO2)
SELECT CAMPO1, CAMPO2
FROM DUAL
WHERE CAMPO=VALOR
but I do not see how it concatenates.