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,
Adding a text box value to a current MySQL record
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
UPDATE tableName SET fieldName = CONCAT(fieldName, 'foo') WHERE someField = 'foo'