加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

Perl DBI函数

发布时间:2020-12-16 00:02:31 所属栏目:大数据 来源:网络整理
导读:use DBmodule; $db_s = new DBmodule; $db_key = $db_s -connect_db( ' w3a_system ' , ' localhost ' , ' root ' , ' ferbernet!@#!@! ' ); $abk = $db_s -select_db( $db_key , " select * from w3a_xser " ); %log_result =result( $abk , ' scriptaa ' )
use DBmodule; $db_s=new DBmodule; $db_key=$db_s->connect_db('w3a_system','localhost','root','ferbernet!@#!@!'); $abk=$db_s->select_db($db_key,"select * from w3a_xser"); %log_result=result($abk,'<scriptaa>'); if(%log_result){ print "匹配"; for }else{ print "不匹配"; } sub result{ local($sql)=shift; local($method)=shift; # clean list array # print execute result
  my %target=(); while($list=$sql->fetchrow_hashref()){ # $regex=$list->{'method_regex'};
      if($method=~m/$list->{'method_regex'}/) { $target{'id'}=$list->{'id'}; $target{'method_name'}=$list->{'method_name'}; $target{'method_level'}=$list->{'method_level'}; $target{'method_switch'}=$list->{'method_switch'}; } } return %target; }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读