执行报错:
DBD::mysql::st execute failed: Illegal mix of collations
(gb2312_chinese_ci,IMPLICIT) and
(latin1_swedish_ci,COERCIBLE) for operation '=' at ./mysql_check.pl line 12.
一看发现是编码问题
解决办法:
$dbh->do("set names utf8;"); #插入此行
my $sth = $dbh->do(含有中文字符的sql命令);
阅读(1282) | 评论(0) | 转发(0) |