帝国CMS后台搜索提示“MySQL Illegal mix of collations for operation ‘like’”解决办法

2018-11-0521:38:04网站建设与开发Comments1,922 views字数 351阅读模式

帝国CMS网站搬家时发现后台信息搜索出错,提示如下错误文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/7682.html

Illegal mix of collations for operation 'like'
select count(*) as total from ***_ecms_crm where (title like '%高级%' or sskehu like '%高级%' or ssgs like '%高级%' or domain like '%高级%'文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/7682.html

这是由于升级mysql5.5才会出现的错误,文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/7682.html

只需打开 /e/admin/LisNews.php文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/7682.html

查找:文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/7682.html

$sr['searchallfield'].=$or.$r1[1]." like '%[!--key--]%'";

改为文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/7682.html

$sr['searchallfield'].=$or.$r1[1]." like binary '%[!--key--]%'";

即可文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/7682.html

  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/cms/7682.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定