Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1125482
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 11 months ago.
Improve this questionI am running into a collation problem when using a function.
My query is this
SELECT CONCAT(PERSON.LastName,', ',PERSON.FirstName) AS 'PersonName',
funcGetStandardValue(PERSON.ProgrammeId) AS Programme
FROM wp_persons AS PERSON WHERE (funcGetStandardValue(PERSON.ProgrammeId) = 'Programme1' )
The function is this
BEGIN
DECLARE theTitle VARCHAR(100);
SELECT Title INTO theTitle FROM wp_standard_values WHERE SvId = Id;
RETURN theTitle;
END
Both tables (and all varchar columns) concerned (wp_persons and wp_standard_values) have the same collation of utf8mb4_general_ci
The error returned is
Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (utf8mb4_unicode_520_ci,COERCIBLE) for operation '='
The error does not occur if I run the sql script in phpmyadmin
本文标签: wpdbIllegal mix of collations using a function
版权声明:本文标题:wpdb - Illegal mix of collations using a function 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736668121a1946773.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论