PDA

View Full Version : Search and replace syntax



asylu3
25-08-2004, 05:29 PM
If you want to search a certain key in mysql and replace with the new one. Here is the syntax you are looking for


update table_name set field_name = replace(field_name,'what_looking_for','replace_with_this');


ex:

update tf_messages set posterid = replace(posterid,'99','0');