mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-10-05 06:57:34 +03:00
if nameaddress_vector was {} the database queries failed
This commit is contained in:
parent
c78a64ec9b
commit
850ab6999c
@ -220,11 +220,17 @@ if ($bIncludeKeywords) {
|
|||||||
$aPlaceSearchName = $oDB->getRow($sSQL);
|
$aPlaceSearchName = $oDB->getRow($sSQL);
|
||||||
|
|
||||||
if (!empty($aPlaceSearchName)) {
|
if (!empty($aPlaceSearchName)) {
|
||||||
$sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['name_vector'], 1, -1).')';
|
$sWordIds = substr($aPlaceSearchName['name_vector'], 1, -1);
|
||||||
$aPlaceSearchNameKeywords = $oDB->getAll($sSQL);
|
if (!empty($sWordIds)) {
|
||||||
|
$sSQL = 'SELECT * FROM word WHERE word_id in ('.$sWordIds.')';
|
||||||
|
$aPlaceSearchNameKeywords = $oDB->getAll($sSQL);
|
||||||
|
}
|
||||||
|
|
||||||
$sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['nameaddress_vector'], 1, -1).')';
|
$sWordIds = substr($aPlaceSearchName['nameaddress_vector'], 1, -1);
|
||||||
$aPlaceSearchAddressKeywords = $oDB->getAll($sSQL);
|
if (!empty($sWordIds)) {
|
||||||
|
$sSQL = 'SELECT * FROM word WHERE word_id in ('.$sWordIds.')';
|
||||||
|
$aPlaceSearchAddressKeywords = $oDB->getAll($sSQL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user