原來的查詢是:爲什麼我會得到#1064 - 你在你的SQL語法錯誤
UPDATE `test`.`documents` SET `title` = ‘測試中文’, `content` = ‘this is my test document number two,應該搜的到吧’ WHERE `documents`.`id` = 2;
這就造成:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'my test document number two,åº」该æ
我改變了錯誤的'
UPDATE 'test'.'documents' SET 'title' = '測試中文', 'content' = 'this is my test document number two,應該搜的到吧' WHERE 'documents'.'id' = 2;
得到:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''test'.'documents' SET 'title' = '测试ä¸æ–‡', 'content' = 'this is my test do' at line 1
如何設置我的my.ini?
我使用XAMPP Lite和MySQL版本5.1.37。
回覆:更新,10塊錢表示你已經將字符集配置爲latin1而不是utf8。 – Aaronaught 2010-02-04 03:55:01
如何將字符設置爲utf-8,謝謝 – zjm1126 2010-02-04 03:57:14