- $sSQL = 'SELECT * FROM word WHERE word_id in ('.substr($aPlaceSearchName['nameaddress_vector'], 1, -1).')';
- $aPlaceSearchAddressKeywords = $oDB->getAll($sSQL);
+ $sWordIds = substr($aPlaceSearchName['nameaddress_vector'], 1, -1);
+ if (!empty($sWordIds)) {
+ $sSQL = 'SELECT * FROM word WHERE word_id in ('.$sWordIds.')';
+ $aPlaceSearchAddressKeywords = $oDB->getAll($sSQL);
+ }