Revision: 18064
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 22, 2009 09:11 by iroybot
Initial Code
UPDATE `table` SET `table`.`fieldname` = replace(`fieldname`, 'search_value', 'replace_with') WHERE `table`.`firstcondition_field` = 'firstcondition_value' AND `table`.`secondcondition_field` = 'secondcondition_value' AND so on...
Initial URL
Initial Description
as a note to self... in order to find it laters... This will only alter the value of fieldname if the conditions in the WHERE clause are met. With replace we only replace a certain string within fieldname with the replace_with string
Initial Title
Conditional String Replace
Initial Tags
replace, update
Initial Language
MySQL