MySQL Search and Replace
Friday, January 23, 2009
This is definitely useful…
UPDATE `<table_name>` SET `<field_name>` = replace( <field_name>, ‘<string_search>’, ‘<string_replace>’ ) ;
Cheers!!
This is definitely useful…
UPDATE `<table_name>` SET `<field_name>` = replace( <field_name>, ‘<string_search>’, ‘<string_replace>’ ) ;
Cheers!!
OK, I needed to write this down as I do not use this comparison on a daily basis, but use it enough where its getting annoying that I have to research it every time I use it.
So without further ado…..
(expression) ? ‘do this if true‘ : ‘do this if false‘
Voila