Changeset 50


Ignore:
Timestamp:
11/02/04 13:14:41 (20 years ago)
Author:
Kris Deugau
Message:

/branches/stable

SQL update for deleting blocks to make sure the correct city
gets attached to the new freeblocks entry.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/main.cgi

    r49 r50  
    14821482
    14831483        # Set up query for compacting free blocks.
    1484         $sth = $ip_dbh->prepare("select * from freeblocks where city='$webvar{city}'".
     1484        $sth = $ip_dbh->prepare("select * from freeblocks where cidr << ".
     1485                "(select cidr from routed where cidr >> '$cidr') ".
    14851486                " and maskbits<=".$cidr->masklen." and routed='y' order by maskbits desc");
    14861487
     
    15281529      } else {
    15291530        $sth = $ip_dbh->prepare("insert into freeblocks values ('$cidr',".$cidr->masklen.
    1530                 ",'$webvar{city}','y')");
     1531                ",(select city from routed where cidr >>= '$cidr'),'y')");
    15311532      }
    15321533      $sth->execute;
Note: See TracChangeset for help on using the changeset viewer.