Mojo Mysql utf-8字符集 需要{mysql_enable_utf8 => 1}
来源:互联网 发布:淘宝不清洗二次排查 编辑:程序博客网 时间:2024/06/03 17:44
get '/api/log_mon/get_log' => sub{ my $c = shift; my $env = $c->param('env'); my $host = $c->param('host'); use DBI;my $dbUser='DEVOPS'; my $user="root"; my $passwd="1234567"; my @arr2=();; my $dbh = DBI->connect("dbi:mysql:database=DEVOPS;host=192.168.32.161;port=3306",$user,$passwd,{mysql_enable_utf8 => 1} ) or die "can't connect to database ". DBI-errstr;my $hostSql = qq{select sn,host_name,host_ip,v_date,info,env from err_info where env='$env' and host_name='$host' order by v_date desc limit 20}; my ($a1, $a2, $a3,$a4,$a5,$a6,$a7,$a8,$a9); my $selStmt = $dbh->prepare($hostSql); $selStmt->execute(); $selStmt->bind_columns(undef, \$a1, \$a2, \$a3,\$a4,\$a5,\$a6); #$selStmt->execute(); while( $selStmt->fetch() ){ push (@arr2, "$a1 $a2 $a3 $a4 $a5 $a6\n" );};chomp @arr2;print "\@arr2 is @arr2\n"; $c->render(json => \@arr2); };
0 0
- Mojo Mysql utf-8字符集 需要{mysql_enable_utf8 => 1}
- mojo 默认启用utf-8
- 测试关闭mojo utf-8
- MySQL 修改UTF-8字符集
- 修改mysql 字符集 utf-8
- perl unload mysql utf-8字符集 需要设置$dbh->do("SET NAMES utf8");
- mysql 4.1.9 utf-8 字符集问题解决
- php+mysql+apache utf-8字符集
- mysql中文排序(utf-8字符集)
- MYSQL默认字符集UTF-8设置
- mysql 修改字符集问题 utf-8
- mysql创建utf-8字符集数据库
- mysql创建utf-8字符集数据库
- mysql创建utf-8字符集数据库
- 快捷设置mysql字符集utf-8
- mysql创建utf-8字符集数据库
- Mysql(5.7)设置字符集为UTF-8
- MySQL数据库修改字符集为UTF-8
- 论文笔记:Inception-V4, Inception-ResNet
- Linux环境下node.js环境的搭建以及配置,使用node.js编写工具与简化less编译
- AndroidStudio -开源项目日志输入工具==Logger
- windows+linux双系统的安装
- 理解MySQL——索引与优化
- Mojo Mysql utf-8字符集 需要{mysql_enable_utf8 => 1}
- bin/hdfs dfs -mkdir xmkdir
- UI复习大纲
- IplImage, CvMat, Mat 的关系
- pack和unpack格式化字符串(format string)解释
- 企业如何实现数据安全存储
- but no declaration can be found for element 'mvc:resources'(springmvc 常见错误)
- 论文笔记:Faster RCNN
- 满意度调查全过程