Mysql section replaces SQL statement sharing
Replace Welcom to in the subject field of the cdb_pms table with Welcome
The code is as follows:
UPDATE `cdb_pms`
SET `subject`=REPLACE(`subject`,'Welcome to','Welcome to')
WHERE INSTR(`subject`,'Welcome to') > 0
Replace the message field of the cdb_posts table, replace "viewthread.php?tid=3989" with "viewthread.php?tid=16546"
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
The code is as follows:
UPDATE `es_product` SET `pro_pub_time`=TRIM(`pro_pub_time`)
Delete all characters full of'[' or']' or'.'
The code is as follows:
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 Chinese'-' with English'-'
The code is as follows:
UPDATE `es_product` SET `pro_pub_time`=REPLACE(`pro_pub_time`, '-','-') WHERE INSTR(`pro_pub_time`,'-') > 0
Replace all years and months with'-'
The code is as follows:
UPDATE `es_product` SET `pro_pub_time`=REPLACE(`pro_pub_time`,'year','-') 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 types of '2005-04-' with '2005-04-01'
The code is as follows:
UPDATE `es_product` SET `pro_pub_time`=CONCAT(`pro_pub_time`, '01') WH ERE SUBSTRING_INDEX(`pro_pub_time`,'-',-1)='' AND LENGTH(`pro_pub_time`) > 0 AND LENGTH(`pro_pub_time`) > 5
Combine all' 2005-'This type is replaced with '2005-01-01'
The code is 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
Change all the ones that contain'-' but the number of digits is less than 8 to add'-01'
The code is 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"
The code is 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 format all '2005-01-01' into '2005 January'
The code is as follows :
UPDATE `es_product` SET `pro_pub_time`=DATE_FORMAT(`pro_pub_time`,'%Yyear%mmonth') WHERE INSTR(`pro_pub_time `,'-') > 0
Tags
24 Comments

urenrjrjkvnm
Vikigfg
2023-09-27

Ilushikpqt
2023-09-23

Cinema
Viktoriqjl
2023-09-23

Novost
Margaretbzb
2023-09-23

Novost
Margaretlfv
2023-09-22

Ilushikipc
2023-09-22

Cinema
Viktorisds
2023-09-22

Novost
Roblrr
2023-09-20

Ilushikzti
2023-09-20

coin
Eldarkeu
2023-09-18

Julibkv
2023-09-02

Life
Veronafix
2023-08-29

urenrjrjkvnm
Leonebb
2023-08-28

urenrjrjkvnm
Leonomp
2023-08-28

Life
Veronawvm
2023-08-27

urenrjrjkvnm
Veronacdj
2023-08-26

Novost
Sergujb
2023-08-23

urenrjrjkvnm
Svetlanabya
2023-08-21

Novyny
Svetlgek
2023-08-20

Novyny
Svetllpc
2023-08-18

Ukraine
Igorfne
2023-08-13

Novyny
Svetldip
2023-08-10

Novyny
Svetlozj
2023-08-08
urenrjrjkvnm
Vikibwn
2023-09-29