Changeset 712
- Timestamp:
- 03/25/15 17:11:27 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r707 r712 524 524 "AND type ~ '[mc]\$' AND master_id = ? AND NOT cidr = ? "); 525 525 my $alsth = $dbh->prepare("SELECT count(*) FROM allocations WHERE cidr <<= ? ". 526 "AND NOT type='rm' AND NOT type='mm' AND master_id = ? ");526 "AND NOT type='rm' AND NOT type='mm' AND master_id = ? AND NOT id = ?"); 527 527 my $freesth = $dbh->prepare("SELECT count(*) FROM freeblocks WHERE cidr <<= ? AND master_id = ?"); 528 528 my $lfreesth = $dbh->prepare("SELECT masklen(cidr) AS maskbits FROM freeblocks WHERE cidr <<= ?". … … 537 537 $substh->execute($cidr, $mid, $cidr); 538 538 my ($cont) = $substh->fetchrow_array(); 539 $alsth->execute($cidr, $mid );539 $alsth->execute($cidr, $mid, $id); 540 540 my ($alloc) = $alsth->fetchrow_array(); 541 541 $freesth->execute($cidr, $mid); … … 588 588 589 589 my $alsth = $dbh->prepare("SELECT count(*) FROM allocations WHERE cidr <<= ? ". 590 "AND NOT type='rm' AND NOT type='mm' AND master_id = ? ");590 "AND NOT type='rm' AND NOT type='mm' AND master_id = ? AND NOT id = ?"); 591 591 my $freesth = $dbh->prepare("SELECT count(*) FROM freeblocks WHERE cidr <<= ? AND master_id = ?"); 592 592 my $lfreesth = $dbh->prepare("SELECT masklen(cidr) AS maskbits FROM freeblocks WHERE cidr <<= ?". … … 597 597 $desc .= " - vrf:$vrf" if $desc && $vrf; 598 598 $desc = "vrf:$vrf" if !$desc && $vrf; 599 $alsth->execute($cidr, $mid );599 $alsth->execute($cidr, $mid, $id); 600 600 my ($alloc) = $alsth->fetchrow_array(); 601 601 $freesth->execute($cidr, $mid);
Note:
See TracChangeset
for help on using the changeset viewer.