Tag:os ar for sp Data on code ad bs
Replace the welcom to in the Cdb_pms table Subject field with the welcome copy Code code as follows:update ' Cdb_pms ' SET ' Subject ' = replace (' subject ', ' welcome to ', ' welcome ') where instr (' Subject ', ' Welcome to ') > 0 replace the message field of the Cdb_posts table with "viewthread.php?tid=3989" to "viewthread.php?" tid=16546 " Copy code code as follows:update ' cdb_posts ' SET ' message ' = replace (' message ', ') viewthread.php?tid=3989 ', ' viewthread.php?tid=16546 ') where instr (' message ', ' Viewthread.php?tid =3989 ') > 0 ; remove all spaces Copy code code as follows:update ' es_product ' SET ' Pro_ Pub_time ' = trim (' pro_pub_time ') Remove all ' [' or '] ' or '. ' The character copy code code below:update ' es_product ' SET ' pro_pub_time ' = replace (' pro_pub_ Time ', ' [', ' ') where instr (' Pro_pub_time ', ' [') > 0 UPDATE ' es_product ' SET ' Pro_pub_time ' = replace (' Pro_pub_time ',  , '] ', ') where instr (' Pro_pub_time ', '] ') > 0 UPDATE ' es_product ' set ' Pro_pub_time ' = replace (' pro_pub_time ', '. ', '-') where instr (' Pro_pub_time ', '. ') > 0 Replace all English '-'-' copy code code as follows:update ' es_product ' SET ' pro_pub_ Time ' = replace (' pro_pub_time ', '-', '-') where instr (' Pro_pub_time ', '-') > 0 Replace all years with '-' copy code code as follows:update ' es_product ' SET ' pro_pub_time ' = replace (' pro_pub_time ', ' years ', '-') where instr (' Pro_pub_time ', ' year ') > 0 update ' es_product ' SET ' pro_pub_time ' = replace (' pro_pub_time ', ' month ', '-') Where instr (' Pro_pub_time ', ' month ') > 0 replace all ' 2005-04-' This type with ' 2005-04-01 ' copy code The code is as follows:update ' es_product ' SET ' Pro_pub_time ' = concat ( ' pro_pub_time ', ' 01 ') where subString_index ( ' pro_pub_time ', '-', -1) = ' and length (' pro_pub_time ') > 0 and length (' pro_pub_time ') > 5 replace All ' 2005-' This type with ' 2005-01-01 ' Copy code code as follows:update ' es_product ' SET ' Pro_pub_time ' = concat ( ' pro_pub_ Time ', ' 01-01 ') where instr (' Pro_pub_time ', '-') > 0 and length (' Pro_pub_ Time ') = 5 add all '-', but the number of bits less than 8 is changed to append ' -01 ' copy code code as follows:update ' es_product ' set ' Pro_pub_time ' = concat ( ' pro_pub_time ', ' -01 ') where instr (' Pro_pub_ Time ', '-') > 0 and length (' Pro_pub_time ') < 8 change All ' 2005 ' to ' 2005-01-01 ' Copy code code as follows:update ' es_product ' SET ' pro_pub_time ' = concat (' Pro_ Pub_time ', ' -01-01 ') where instr (' Pro_pub_time ', '-') = 0 and length (' Pro_pub_time ') = 4 finally will all ' 2005-01-01 ' formatted ' January 2005 ' copy code code as follows:update ' es_product ' SET ' pro_pub_time ' = Date_format (' Pro_pub_time ', '%y year%m Month ') where instr (' Pro_pub_time ', '-') > 0
MySQL Database replacement