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