Changeset 931
- Timestamp:
- 10/21/22 12:48:30 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/search.cgi
r930 r931 237 237 # Show any blocks with the leading octet(s) and that masklength 238 238 # Need some more magic for bare /nn searches: 239 $sql .= " $sqlconcat ($sqlbase WHERE $webvar{cidrexclude} (masklen(s.cidr) = ?";239 $sql .= " $sqlconcat ($sqlbase WHERE $webvar{cidrexclude} (masklen(s.cidr)) = ?"; 240 240 push @bindargs, $maskbits; 241 241 if ($net ne '') { 242 242 $sql .= " AND text(s.cidr) LIKE ?"; 243 push @bindargs, $net;243 push @bindargs, "$net%"; 244 244 } 245 $sql .= ") )";245 $sql .= ")"; 246 246 } 247 247 } elsif ($webvar{cidr} =~ /^(\d{1,3}\.){3}\d{1,3}$/) { … … 270 270 } else { 271 271 # Add the limit/offset clauses 272 $sql .= " ORDER BY s.cidr"; 272 # note ORDER BY needs to NOT reference the table alias s as in $sqlbase because Reasons 273 $sql .= " ORDER BY cidr"; 273 274 $sql .= " LIMIT $RESULTS_PER_PAGE OFFSET $offset" if $RESULTS_PER_PAGE != 0; 274 275 # And tell the user.
Note:
See TracChangeset
for help on using the changeset viewer.