Forum Moderators: open
Using mySQL 4.1.22, I'd like to carry out an SQL query to find a
string containing acute vowels.
mytable:
- item1:
--- firstname: Antonio
--- lastname: Fernández
--- comments: he's from Spain
My SQL query:
------
SELECT id FROM mytable WHERE MATCH(firstname, lastname, comments)
AGAINST ('+"fernandez"' IN BOOLEAN MODE) ORDER BY firstname, lastname
--------
If mytable is in latin1, it works fine. But if mytable is in utf8
(it's the case) it doesn't work. How can I change my SQL query to
match 'Fernández' in UTF8 within the table?
My ft configuration in /etc/my.conf:
------
ft_min_word_len=1
ft_stopword_file=''
-----
I tried also adding these two lines after DB connection (PHP code):
-------
mysql_query ("SET NAMES utf8;");
mysql_query ("SET CHARACTER_SET utf8;");
------
but it won't work :(
Thank you very much.