【发布时间】:2012-04-25 22:29:09
【问题描述】:
此 SQL 失败。
SQL 是
INSERT INTO
`migration_loose_terms`
(`source`,`field`,`term`,`lastaccess`)
VALUES
('services.media','keywords','spermatozoïde','2012-04-25 12:00:00')
因为它包含一个奇怪的(ï) 字符。
你在 php/mysql 中使用什么函数来清除要被剥离的 nonascii 字符或以某种方式使该词进入 mysql?
【问题讨论】:
-
我确保一切都使用 UTF-8:我的表、PHP-MySQL 连接、PHP 内、浏览器内...
-
像这样;不正确的字符串值:第 1 行的列 'term' 的 '\xEFde'
-
for where 语句总是在您要查找的值前面使用 N 例如:select value from table where value = N'value';
标签: php mysql sql non-ascii-characters