Ignore:
Timestamp:
04/06/06 10:40:50 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Search got broken somewhere - I apparently used an old definition
for the searchme view, and there's additional hackery necessary
to search both old and new CustIDs.

Location:
branches/stable/cgi-bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/ipdb.psql

    r286 r323  
    9595GRANT ALL on "allocations" to "ipdb";
    9696
    97 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes FROM poolips;
     97CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description, allocations.notes, allocations.oldcustid FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description, poolips.notes, poolips.oldcustid FROM poolips;
    9898
    9999REVOKE ALL on "searchme" from PUBLIC;
  • branches/stable/cgi-bin/search.cgi

    r319 r323  
    105105
    106106  # First chunk of SQL.  Filter on custid, description, and notes as necessary.
    107   my $sql = "(select $cols from searchme where $webvar{custexclude} custid ilike '%$webvar{custid}%')".
    108         " $sqlconcat $webvar{custexclude} oldcustid ilike '%$webvar{custid}%')".
     107  my $sql = "(select $cols from searchme where".
     108        " $webvar{custexclude} (custid ilike '%$webvar{custid}%'".
     109        " OR $webvar{custexclude} oldcustid ilike '%$webvar{custid}%'))".
    109110        " $sqlconcat (select $cols from searchme where $webvar{descexclude} description ilike '%$webvar{desc}%')".
    110111        " $sqlconcat (select $cols from searchme where $webvar{notesexclude} notes ilike '%$webvar{notes}%')";
Note: See TracChangeset for help on using the changeset viewer.