Page 1 of 1

Adding a text box value to a current MySQL record

Posted: Mon Dec 11, 2006 1:28 pm
by impulse()
I have a form at the moment and I want the value of the text box to be added onto a field in a MySQL DB. I don't want the value to replace the exists value, but to add it on. Is there an option to do this?
I'm aware that I could extract the data into a variable and then add the text box value onto it and then insert that value into the DB but that's going to prove tricky in my instance.

Regards,

Posted: Mon Dec 11, 2006 3:09 pm
by feyd

Code: Select all

UPDATE tableName SET fieldName = CONCAT(fieldName, 'foo') WHERE someField = 'foo'