Changeset 627 for trunk/cgi-bin/IPDB.pm
- Timestamp:
- 10/08/14 17:17:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r625 r627 460 460 # Just In Case 461 461 $args{vrf} = '' if !$args{vrf}; 462 $args{rdepth} = 1 if !$args{rdepth};463 462 464 463 # Snag the allocations for this block 465 my $sth = $dbh->prepare("SELECT cidr,city,type,custid,swip,description ".466 " FROM allocations WHERE parent = ? AND rdepth= ? ORDER BY cidr");467 $sth->execute($args{ block},$args{rdepth});464 my $sth = $dbh->prepare("SELECT cidr,city,type,custid,swip,description,id,master_id". 465 " FROM allocations WHERE parent_id = ? ORDER BY cidr"); 466 $sth->execute($args{parent}); 468 467 469 468 # hack hack hack … … 472 471 473 472 my @blocklist; 474 while (my ($cidr,$city,$type,$custid,$swip,$desc ) = $sth->fetchrow_array()) {473 while (my ($cidr,$city,$type,$custid,$swip,$desc,$id) = $sth->fetchrow_array()) { 475 474 $custsth->execute($custid); 476 475 my ($ncust) = $custsth->fetchrow_array(); … … 484 483 desc => $desc, 485 484 hassubs => ($type eq 'rm' || $type =~ /.c/ ? 1 : 0), 485 id => $id, 486 486 ); 487 487 # $row{subblock} = ($type =~ /^.r$/); # hmf. wonder why these won't work in the hash declaration...
Note:
See TracChangeset
for help on using the changeset viewer.