Changeset 550 for branches/stable/cgi-bin/IPDB.pm
- Timestamp:
- 11/12/12 17:31:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/IPDB.pm
r549 r550 345 345 # and available='y' order by ip limit 1); 346 346 347 $sth = $dbh->prepare("select ip from poolips where pool='$alloc_from'". 348 " and available='y' order by ip"); 349 $sth->execute; 350 351 my @data = $sth->fetchrow_array; 352 $cidr = $data[0]; # $cidr is already declared when we get here! 347 # If no specific IP was requested, pick the next available one from the pool. 348 if (!$cidr) { 349 $sth = $dbh->prepare("select ip from poolips where pool='$alloc_from'". 350 " and available='y' order by ip"); 351 $sth->execute; 352 353 my @data = $sth->fetchrow_array; 354 $cidr = $data[0]; # $cidr is already declared when we get here! 355 } 353 356 354 357 $sth = $dbh->prepare("update poolips set custid='$custid',".
Note:
See TracChangeset
for help on using the changeset viewer.