开发者

MySQL Collate Latin1_General_CI_AI Problem

I h开发者_Python百科ave the following select statement where I'm trying to search for a players first and last name that may contain accents in it.

$sql = "
    SELECT * FROM player
    WHERE player.player_first LIKE '%$first%'
    AND player.player_last LIKE '%$last%'
    ";

I adding COLLATE Latin1_General_CI_AI after before both of the LIKE clauses, but that didn't work and returned errors.

Any help would be appreciated.


According to MySQL doc the collation Latin1_General_CI_AI does not exists.

Try latin1_general_ci instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜