![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
perl
Winnycatty
这个作者很懒,什么都没留下…
展开
-
Perl:接收select count(*) from tables;返回值
数据库中内容如下图:要查询 host = 'HOST:10.1.1.5'的记录数:#!/usr/bin/perluse DBI;my $host = "localhost";my $driver ="mysql";my $database = "catchdata";my $dsn = "DBI:$driver:database=$database:$host";my $...原创 2019-04-27 16:37:26 · 967 阅读 · 1 评论 -
fetchrow_array()与fetchrow_arrayref()与fetchrow_hashref()的使用方法
fetchrow_array这个方法取下一行数据并且作为一个字段值数组返回它。范例:while(@row = $sth->fetchrow_array) {print qw($row[0]/t$row[1]/t$row[2]/n);}fetchrow_arrayref这个方法取下一行数据并且作为一个对一个字段值数组的引用返回它。范例:while($row_ref = $st...原创 2019-04-27 16:36:14 · 1237 阅读 · 0 评论 -
perl DBI 总结
最近在写perl程序进行数据的采集,perl教程在网上少的可怜呐,至少我找到的资料是很少的。在连接数据库方面下面这个博客写的还是很清晰的,所以就转过来了。源文地址:http://blog.csdn.net/like_zhz/article/details/5441946DBI和DBD的不同关系模型:############################################...转载 2019-04-27 16:43:45 · 1599 阅读 · 0 评论