Page 1 of 1

MySQL Query problem with spanish accents

Posted: Fri Feb 02, 2007 11:36 am
by emmbec
Hi, I have a table that stores people's name, it is in Spanish, and there are some names that have an accent, like "José".

If I try the following query I get no results back:

Code: Select all

select * from people where c_name like '%Jose%';
However If I use this one, I get the guys name:

Code: Select all

select * from people where c_name like '%José%';
I think it is because José is different to Jose without the accents.

Does anyone knows how could I perform this query so I can get those people's names that have accents, even if the users writes "Jose" or "José"???

Thanks!

Posted: Fri Feb 02, 2007 1:48 pm
by emmbec
I fixed the problem, I was using latin1_general_ci collation in my database for the name column, I changed it to utf8_spanish_ci and all my problems were solved!