From fd38dd02ce0d503ff520a08ea98b7b11ab8988d3 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 9 Feb 2022 21:42:28 +0100 Subject: [PATCH] make sure step is taken into account for interpolations --- lib-php/SearchDescription.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib-php/SearchDescription.php b/lib-php/SearchDescription.php index a7b26c12..fbf6b650 100644 --- a/lib-php/SearchDescription.php +++ b/lib-php/SearchDescription.php @@ -650,7 +650,8 @@ class SearchDescription if (preg_match('/^[0-9]+$/', $this->sHouseNumber)) { $sIpolHnr = 'WHERE parent_place_id = sin.place_id '; $sIpolHnr .= ' AND startnumber is not NULL AND sin.address_rank < 30'; - $sIpolHnr .= ' AND '.$this->sHouseNumber.' between startnumber and endnumber '; + $sIpolHnr .= ' AND '.$this->sHouseNumber.' between startnumber and endnumber'; + $sIpolHnr .= ' AND ('.$this->sHouseNumber.' - startnumber) % step = 0'; $sInterpolSql = 'SELECT array_agg(place_id) FROM location_property_osmline '.$sIpolHnr; if (CONST_Use_US_Tiger_Data) { -- 2.39.5