2011-11-30 1 views
1

검색어 :왜이 오류 : 작업 '='에 대한 잘못된 조합 (utf8_general_ci, IMPLICIT) 및 (utf8_bin, NONE)이이 쿼리에 있습니까?

select *, 
     (@page_path = concat(
      @page_path, 
      chk_v_application_tree.alias 
     )) as path 
from chk_v_application_tree 

[Err] 1267 - Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_bin,NONE) for operation '='

+0

가능한 중복 [MYSQL 대소 문자 구분 검색 utf8_bin 필드] (http://stackoverflow.com/questions/901066/mysql-case-sensitive-search-for-utf8-bin-field) – ajreal

답변

0

보십시오 : 당신이 CONCAT (utf8_general_ci, utf8_bin) 같은 CONCAT 함수에서 charset 인코딩을 혼합하지 않을 수 있습니다으로

select *, 
     (@page_path = concat(
      CONVERT(@page_path USING utf8) COLLATE utf8_bin, 
      chk_v_application_tree.alias 
     )) as path 
from chk_v_application_tree 

.

관련 문제