当我通过PHP插入西里尔文本时,它会插入一行,但记录为空:
<?php
$link = new mysqli('localhost', 'xxx', 'xxx', 'xxx');
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
/* change character set to utf8 */
if (!mysqli_set_charset($link, "utf8")) {
printf("Error loading character set utf8: %s\n", mysqli_error($link));
} else {
printf("Current character set: %s\n", mysqli_character_set_name($link));
}
if($link->connect_errno > 0){
die('Unable to connect to database [' . $link->connect_error . ']');
}
mysqli_query($link, "INSERT INTO applications (firstname, lastname, university, specialty, course, hobby, motivation, phone, email) VALUES ('да', 'да', 'да', 'да', 'да', 'да', 'да', 'да', 'да')");
mysqli_close($link);
?>
当我删除/ *更改字符集为utf8 * /条目是符号时......问题出在哪里?