1.正则使用 比 LIKE 会牺牲很多的系统资源 尽量不要用

  正则的语法和JS PHP 差不多

  select * from t1 where email REGEXP "@163[,.]com$";

  select * from t1 where email like "%@163.com" or email like "%@163,com"

2.REPLACE 函数的使用

  UPDATE `v9_zhushou` SET `thumb` = REPLACE(`thumb`, 'http://localhost/ciwei/', 'http://www.qciwei.com/ciwei/') WHERE `id` > 0

  UPDATE `v9_zhushou_data` SET `iphone` = REPLACE(`iphone`, 'http://localhost/ciwei/', 'http://www.qciwei.com/ciwei/') WHERE `id` = 300

  

  

相关文章:

  • 2022-12-23
  • 2021-11-02
  • 2021-09-05
  • 2021-07-17
  • 2021-07-18
  • 2021-12-09
  • 2022-01-04
  • 2021-12-22
猜你喜欢
  • 2021-08-17
  • 2021-07-12
  • 2021-08-09
  • 2021-12-01
  • 2021-06-07
  • 2021-07-14
  • 2021-08-30
相关资源
相似解决方案