Changeset 5 for trunk/dnsbl/DNSBL.pm


Ignore:
Timestamp:
09/10/09 12:48:42 (15 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

Tweak IP-adding script, template, and the DNSBL::ipexists to show how
many times an IP has been reported

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/DNSBL.pm

    r4 r5  
    123123}
    124124
    125 # return true if the IP has been reported
     125
     126## DNSBL::ipexists()
     127# return report count if the IP has been reported, otherwise return undef
    126128sub ipexists {
    127129  my $self = shift;
    128130  my $ip = shift;
    129   my $sth = $dbh->prepare("SELECT count(*) FROM iplist WHERE ip=?");
     131  my $sth = $dbh->prepare("SELECT count FROM iplist WHERE ip=?");
    130132  $sth->execute($ip);
    131133  my ($ret) = $sth->fetchrow_array();
    132134  return $ret;
    133 }
     135} # end ipexists()
    134136
    135137
Note: See TracChangeset for help on using the changeset viewer.