完全解決phpcms v9升級後,文章發佈出現:php
MySQL Query : SELECT * FROM `withli_a`.`v9_keyword` WHERE `keyword` = '吼吼' AND `siteid` = '1' LIMIT 1
MySQL Error : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation '='
MySQL Errno : 1267
Message : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operation '='
(上面這個錯誤代碼是phpcms v9中出現的)
出現上面的錯誤,是數據庫字符集不一致的問題。
解決辦法,進phpmyadmin裏面執行SQL語句:
修改表的編碼:
ALTER TABLE `v9_keyword` DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci
修改字段的編碼:
ALTER TABLE `v9_keyword ` CHANGE `keyword ` `keyword ` CHAR( 100 ) CHARACTER SET gbk COLLATE gbk_chinese_ci NOT NULL
而後就能夠了.
(紅色字符請修改爲你數據庫中須要修改的數據表,藍色字符請修改爲你數據庫裏須要修改的字段)
(黃色背景字符改爲你要修改的編碼,若是要修改爲utf8,那就應該是utf8和utf8_bin)數據庫
終於解決了。。。編碼