Indy
Indy

Reputation: 822

Compare French character stored in DB with french string

I have some french names stored in a Mysql DB like this 'CHEF D’ÉQUIPE DU SERVICE À LA CLIENTÈLE' is stored as 'CHEF D’ÉQUIPE DU SERVICE À LA CLIENTÈLE', htmlentitties of the string. When I do a search directly in DB like this,

select * from table where name ='CHEF D’ÉQUIPE DU SERVICE À LA CLIENTÈLE'

its giving results but when I do the same thing in PHP, its not giving any results.

Upvotes: 0

Views: 136

Answers (1)

Hamed Khosravi
Hamed Khosravi

Reputation: 545

try this query before execute your main query. ("SET NAMES 'UTF-8').

Upvotes: 1

Related Questions