Use mysql_set_character_set() instead of SET NAMES