Home > Software engineering >  Consult a great god how to batch replacement database to a record in a list <"">
Consult a great god how to batch replacement database to a record in a list <"">

Time:09-16

RT, a great god teach
My database table structure:


I carried out the operation:
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '\ "', ' ') WHERE ` fonts_xiazai ` like '\ "'
Total effect 0 rows, takes 110 ms.
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '\ "', ' ')
Impact 18022 rows, takes 481 ms.
Warning: records show maximum return lines!
mysql> UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, 'div', ') WHERE ` fonts_xiazai ` like '% % div'
Impact 15756 rows, takes 558 ms.
Warning: records show maximum return lines!
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '& lt; ', ' ') WHERE ` fonts_xiazai ` like '& lt; % '
Impact 2218 rows, takes 167 ms.
Warning: records show maximum return lines!
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '=', ') WHERE ` fonts_xiazai ` like '% %='
Impact 17974 rows, takes 942 ms.
Warning: records show maximum return lines!
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '& lt; "" & gt;
', ' ') WHERE ` fonts_xiazai ` like '& lt; "" & gt;
% '
Total effect 0 rows, takes 111 ms.
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '& lt; "" & gt; ', ' ') WHERE ` fonts_xiazai ` like '& lt; "" & gt; % '
Total effect 0 rows, takes 111 ms.
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '"', ' ')
Impact 18022 rows, takes 462 ms.
Warning: records show maximum return lines!
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, 'href', 'href=' https://bbs.csdn.net/topics/)
Impact 18022 rows, takes 1013 ms.
Warning: records show maximum return lines!
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '" "', ') WHERE ` fonts_xiazai ` like '& lt; "" & gt; % '
Total effect 0 rows, takes 396 ms.
mysql> The UPDATE ` fonts ` SET ` fonts_xiazai `=replace (` fonts_xiazai `, '& lt; "" & gt; ', ' ') WHERE ` fonts_xiazai ` like '& lt; "" & gt; % '
Total effect 0 rows, takes 118 ms.

Can perform the invalid, the great god, please give directions, thank you.

CodePudding user response:

Why make so trouble,,, is not the value of & lt;" "& gt; Replace empty!
UPDATE fonts SET fonts_xiazai='WHERE fonts_xiazai=' & lt; "" & gt; '

CodePudding user response:

<"" & gt; The Spaces should not ordinary Spaces, from the content of the web page grab sometimes has some special characters, use the like '& lt; ?" "& gt; 'a try,
In addition, the upstairs writing seems simpler,
  • Related