I have russian website and instead of russian data I see data on English.
<?php
$dbc_utf8 = mysqli_connect ("mysite.com", "xxxxxxxxxxx", "xxxxxxxxxxx", "xxxxxxxxxxx");
mysqli_query($dbc_utf8, 'SET CHARACTER utf8');
mysqli_query($dbc_utf8, 'SET NAMES utf8');
/* Installing Russian locale Connection */
mysqli_query($dbc_utf8, "SET lc_time_names = 'ru_RU'") ;
?>
I have database where I need field "date_add" on Russian. On screen I see "23 February 2014"
CREATE TABLE `comment_common` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`parent_id` int(5) NOT NULL,
`id_post` int(5) NOT NULL,
`id_shop` int(5) NOT NULL,
`name` varchar(200) CHARACTER SET utf8 NOT NULL,
`comment` text CHARACTER SET utf8 NOT NULL,
`date_add` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11568 DEFAULT CHARSET=cp1251 AUTO_INCREMENT=11568 ;
In database
$sql = "
SELECT id, parent_id, name, comment,
DATE_FORMAT(date_add, '%d %M %Y') as date_add
FROM comment_common
";