I am having problems with my character set - and as a result, certain characters get converted. I changed the column collation to "utf8_general_ci", but it didn't work. When I use phpMyAdmin to edit the field, it updates properly, but when done from PHP it doesn't work (but if I echo the value right before insert, it shows up properly) What do I need to do? I was told I need to change 'character_set_client', but I don't even know where/how to edit it. Any assistance?
For database ALTER DATABASE `database` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Code (markup): For table ALTER TABLE `table` DEFAULT CHARACTER SET utf8; Code (markup): Run it in SQL
I did the alter table, but still when I update a row it doesn't work. What I am entering was given to me by someone: Quali post ritenete più interessanti? When I echo it right before the query, it shows up properly. When I go back and fetch it, I get: Quali post ritenete più interessanti?
For example, it is utf-8 connection for wordpress $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword); $this->query("SET NAMES 'utf8'"); Code (markup): Your phpmyadmin can set certain characters for tables in structure. Another way you can ask your host set the default mysql collation to utf-8.
ooh I was trying to edit my.cnf which seemed to have no effect. When I do "whereis mysql.ini", i get a number of locations. How do I know which one is the one to use?
It is in the root of mysql folder. If you can't find it just do a search. It is just called mysql.ini.