настройка кодировки подключения к базе mysql из php

$conn_id=mysql_connect($database_server, $database_user, $database_password));
mysql_select_db($dbase);
mysql_query(“SET NAMES ‘utf8’;”,$conn_id);
mysql_query(“SET CHARACTER SET ‘utf8’;”,$conn_id);
mysql_query(“SET SESSION collation_connection = ‘utf8_general_ci’;”,$conn_id);

Leave a Reply

Your email address will not be published. Required fields are marked *