adapt frontend to new interpolation table layout

This commit is contained in:
Sarah Hoffmann
2022-01-26 21:24:24 +01:00
parent 4b28b4fed4
commit 6b89624f33
4 changed files with 14 additions and 19 deletions

View File

@@ -769,18 +769,9 @@ class SearchDescription
// if nothing found, search in the interpolation line table
$sSQL = 'SELECT distinct place_id FROM location_property_osmline';
$sSQL .= ' WHERE startnumber is not NULL';
$sSQL .= ' AND parent_place_id in ('.$sRoadPlaceIDs.') AND (';
if ($iHousenumber % 2 == 0) {
// If housenumber is even, look for housenumber in streets
// with interpolationtype even or all.
$sSQL .= "interpolationtype='even'";
} else {
// Else look for housenumber with interpolationtype odd or all.
$sSQL .= "interpolationtype='odd'";
}
$sSQL .= " or interpolationtype='all') and ";
$sSQL .= $iHousenumber.'>=startnumber and ';
$sSQL .= $iHousenumber.'<=endnumber';
$sSQL .= ' and parent_place_id in ('.$sRoadPlaceIDs.')';
$sSQL .= ' and ('.$iHousenumber.' - startnumber) % step = 0';
$sSQL .= ' and '.$iHousenumber.' between startnumber and endnumber';
$sSQL .= $this->oContext->excludeSQL(' AND place_id');
Debug::printSQL($sSQL);