Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在数据库中输入汉字_Php_Html_Mysql_Insert Update - Fatal编程技术网

Php 在数据库中输入汉字

Php 在数据库中输入汉字,php,html,mysql,insert-update,Php,Html,Mysql,Insert Update,我正在使用PHP,并且正在从我的系统向MySQL插入汉字。我使用了前缀N,但遇到了一些错误。这是我的密码 $insert = "INSERT INTO BK (language, id, names) VALUES ('N':language'', ':id', 'N':names'')"; $stmtNew = $dbRemote->prepare($insert); $stmtNew->bindValue(':language', $Val['Language']); $st

我正在使用PHP,并且正在从我的系统向MySQL插入汉字。我使用了前缀N,但遇到了一些错误。这是我的密码

$insert = "INSERT INTO BK (language, id, names) VALUES ('N':language'', ':id', 'N':names'')";
$stmtNew = $dbRemote->prepare($insert);  
$stmtNew->bindValue(':language', $Val['Language']);
$stmtNewL->bindValue(':id', $ID);
$stmtNewL->bindValue(':names', $langVal['Name']);
$stmtNewL->execute();

我可能有什么问题?

有什么错误?您的列或表格字符编码(排序规则)是否设置为
utf8.*
utf8mb4.*
?如何将表格设置为utf8mb4?我不确定@ScuzzyPossible duplicate of You真的应该在提问前用谷歌搜索,如果你只是用谷歌搜索你的问题标题,你就会找到你的答案。@bleykFaust有什么错误?