非法混合排序mysql错误? [英] Illegal mix of collations mysql error?
问题描述
我使用 geoloaction
找到返回xml数据的用户的当前位置
I am using geoloaction
to find the current location of user which returns the xml data
<geonames>
<geoname>
<toponymName>Gulbahar</toponymName>
<name>Golīmar</name>
<lat>24.8922</lat>
<lng>67.0287</lng>
<geonameId>1346867</geonameId>
<countryCode>PK</countryCode>
<countryName>Pakistan</countryName>
<fcl>P</fcl>
<fcode>PPLX</fcode>
<distance>0.14608</distance>
</geoname>
</geonames>
现在我想要< name>Golīmar< / name>
它有一个特殊的字符,在这个名称的基础上,我必须运行查询获取更多的结果,除了这一个,但它生成一些排序规则错误
now i want <name>Golīmar</name>
which has a special character and on the basis of that name i have to run the query to fetch more results except this one but it generates some sort of collation errors
SELECT DISTINCT country
FROM propertydetails
WHERE country NOT IN ( "Golīmar" )
错误:非法的整理组合(latin1_swedish_ci,IMPLICIT)和
(utf8_general_ci,COERCIBLE)操作
Error:Illegal mix of collations (latin1_swedish_ci,IMPLICIT) AND (utf8_general_ci,COERCIBLE) FOR operation
我看到很多堆栈pos但是找不到解决方法
i have seen many stack pos but couldnt find a way to resolve
推荐答案
我已经通过
SELECT DISTINCT country
FROM propertydetails
WHERE country NOT IN ( _latin1 "Golīmar" )
以及连接和表格的字符集和归类$ c> latin1 , latin1_swedish_ci
and the charset and collations of both connection and table to latin1
, latin1_swedish_ci
这篇关于非法混合排序mysql错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!