- Timestamp:
- 01/18/12 13:47:47 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r219 r222 1317 1317 $sql .= " LIMIT $nrecs OFFSET ".($nstart*$nrecs) if $nstart ne 'all'; 1318 1318 1319 my @bindvars = ($id); 1320 push @bindvars, $filter if $filter; 1319 1321 my $sth = $dbh->prepare($sql) or warn $dbh->errstr; 1320 $sth->execute( $id) or warn "$sql: ".$sth->errstr;1322 $sth->execute(@bindvars) or warn "$sql: ".$sth->errstr; 1321 1323 1322 1324 my @retbase; … … 1344 1346 $filter =~ s/[^a-zA-Z0-9_.:-]//g; 1345 1347 1348 my @bindvars = ($id); 1349 push @bindvars, $filter if $filter; 1346 1350 my ($count) = $dbh->selectrow_array("SELECT count(*) FROM ". 1347 1351 ($defrec eq 'y' ? 'default_' : '')."records ". 1348 1352 "WHERE ".($defrec eq 'y' ? 'group' : 'domain')."_id=? ". 1349 1353 "AND NOT type=$reverse_typemap{SOA}". 1350 ($filter ? " AND host ILIKE '%$filter%'" : ''),1351 undef, ( $id) );1354 ($filter ? " AND host ~* ?" : ''), 1355 undef, (@bindvars) ); 1352 1356 1353 1357 return $count;
Note:
See TracChangeset
for help on using the changeset viewer.