X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6f946360c4fe32b9d28da92d8b000315580471dc..6ff987322b4611e4804d0b3cc294788332249bc9:/website/search.php diff --git a/website/search.php b/website/search.php index 2ee07e3c..1ef21e5c 100755 --- a/website/search.php +++ b/website/search.php @@ -664,7 +664,9 @@ { if (4 >= $iMinAddressRank && 4 <= $iMaxAddressRank) { - $sSQL = "select place_id from placex where country_code='".$aSearch['sCountryCode']."' and rank_search = 4 order by st_area(geometry) desc limit 1"; + $sSQL = "select place_id from placex where country_code='".$aSearch['sCountryCode']."' and rank_search = 4"; + if ($sCountryCodesSQL) $sSQL .= " and country_code in ($sCountryCodesSQL)"; + $sSQL .= " order by st_area(geometry) desc limit 1"; $aPlaceIDs = $oDB->getCol($sSQL); } }