help with mysql command to update data in a table
Here is my setup
database name = database
table name = table
inside this table are several fields:
name
info1
info2
info3
Im trying to replace the data that is in info1, info2 and info3 for a specific name but am not sure how to do it.
Would this work? Just to replace info1, I want to get this working and then I'll edit it to include info2 and info3
update table set info1 = replace(info1,'currentstring','newstring') where name ='specificusername';
EDIT:
Ok so I got bold and tried out this commands:
update table set info1 = replace(info1,'currentstring','newstring') where name ='specificusername';
replacing the values for real database values and it worked. Now. What can I do to have one command to replace all 3 info? values?
Last edited by ncsuapex; 09-30-2008 at 11:14 AM.
Reason: title
|