Saturday, 16 January 2010

Find/replace content on SMF with phpmyadmin

Use this:

UPDATE smf_messages SET body = REPLACE(body, 'oldword', 'newword')

Or, if you want to do this for a specific board:

UPDATE smf_messages SET body = REPLACE(body, 'oldword', 'newword') WHERE ID_BOARD = 1
(make sure you change oldword, newword and 1 to your real values):

Or, if you want to carry on this operation on the subjects of a specific board:

UPDATE smf_messages SET subject = REPLACE(subject, 'oldword', 'newword') WHERE ID_BOARD = 1

No comments: