Changeset 576
- Timestamp:
- 12/31/13 17:01:59 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r573 r576 5054 5054 "FROM records WHERE rdns_id=? AND type=6"); 5055 5055 my $recsth = $dbh->prepare("SELECT host,type,val,distance,weight,port,ttl,record_id,location,extract(epoch from stamp),expires,stampactive ". 5056 "FROM records WHERE rdns_id=? AND nottype=6 ".5056 "FROM records WHERE rdns_id=? AND NOT type=6 ". 5057 5057 "ORDER BY masklen(CAST(val AS inet)) DESC, CAST(val AS inet)"); 5058 5058 my $revsth = $dbh->prepare("SELECT rdns_id,revnet,status,changed FROM revzones WHERE status=1 ". … … 5150 5150 } # while ($revsth) 5151 5151 5152 $soasth = $dbh->prepare("SELECT host,type,val,distance,weight,port,ttl,record_id,location ". 5153 "FROM records WHERE rdns_id=? AND type=6"); 5154 $recsth = $dbh->prepare("SELECT host,type,val,distance,weight,port,ttl,record_id,location,extract(epoch from stamp),expires,stampactive ". 5155 "FROM records WHERE domain_id=? AND NOT type=6"); # Just exclude all types relating to rDNS 5156 # "FROM records WHERE domain_id=? AND type < 65280"); # Just exclude all types relating to rDNS 5152 5157 my $domsth = $dbh->prepare("SELECT domain_id,domain,status,changed FROM domains WHERE status=1 ORDER BY domain_id"); 5153 $recsth = $dbh->prepare("SELECT host,type,val,distance,weight,port,ttl,record_id,location,extract(epoch from stamp),expires,stampactive ".5154 "FROM records WHERE domain_id=?"); # Just exclude all types relating to rDNS5155 # "FROM records WHERE domain_id=? AND type < 65280"); # Just exclude all types relating to rDNS5156 5158 $zonesth = $dbh->prepare("UPDATE domains SET changed='n' WHERE domain_id=?"); 5157 5159 $domsth->execute(); … … 5178 5180 $zonefilehandle = *ZONECACHE; 5179 5181 } 5182 5183 # need to fetch this separately so the SOA comes first in the flatfile.... 5184 # Just In Case we need/want to reimport from the flatfile later on. 5185 $soasth->execute($domid); 5186 my (@zsoa) = $soasth->fetchrow_array(); 5187 _printrec_tiny($zonefilehandle, $zsoa[7], 'y',\%recflags,$dom, 5188 $zsoa[0],$zsoa[1],$zsoa[2],$zsoa[3],$zsoa[4],$zsoa[5],$zsoa[6],$zsoa[8],''); 5180 5189 5181 5190 $recsth->execute($domid);
Note:
See TracChangeset
for help on using the changeset viewer.