【问题标题】:SQL Error: 1267 - Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_persian_ci,IMPLICIT) for operation '='SQL 错误:1267 - 操作 '=' 的排序规则 (utf8_general_ci,IMPLICIT) 和 (utf8_persian_ci,IMPLICIT) 的非法混合
【发布时间】:2023-03-21 22:04:01
【问题描述】:

MyBB SQL 错误

MyBB 遇到内部 SQL 错误,无法继续。

SQL 错误:

1267 - Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_persian_ci,IMPLICIT) for operation '='

查询:

SELECT t.*
    ,t.subject AS threadsubject
    ,u.username
    ,u.usergroup
    ,u.displaygroup
    ,i.*
    ,i.NAME AS iconname
    ,t.dateline AS threaddate
    ,t.lastpost AS threadlastpost
FROM mybb_threads t
LEFT JOIN mybb_icons i ON (i.iid = t.icon)
LEFT JOIN mybb_users u ON (t.lastposter = u.username)
WHERE t.visible = '1'
    AND t.uid = '54445'
GROUP BY t.tid
ORDER BY threadlastpost DESC LIMIT 5

请联系 MyBB Group 以获得技术支持。

image1

image 2

【问题讨论】:

  • 通常是表设计不佳的结果。 t.lastposter 和 u.username 是否定义为具有相同的排序规则?
  • 请提供更详细的指导

标签: sql mysql-error-1064 mybb mysql-error-1267


【解决方案1】:

检查Ross Smith II的解决方案。他写了关于在 sql 语句中定义排序规则的文章。

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='

【讨论】:

  • 请提供更详细的指导
猜你喜欢
  • 2016-02-19
  • 2015-09-16
  • 2012-07-30
  • 2010-11-03
  • 2016-09-17
  • 1970-01-01
  • 1970-01-01
  • 2021-04-13
  • 2020-04-15
相关资源
最近更新 更多