ORM 查询编码报错,(gbk_chinese_ci,IMPLICIT) and (utf8...[自己搞定]
>>> \App\Ip::where('zt', '未付')-> get();
Illuminate\Database\QueryException with message 'SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation '=' (S
QL: select * from `ip` where `zt` = 未付)'
>>>
这个数据库是GBK编码,但是不能修改成UTF8的。
用tinker测试报错了,求解决方法,谢谢!
推荐文章: