diff options
author | David M <davidmj@users.sourceforge.net> | 2007-03-14 03:19:58 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-03-14 03:19:58 +0000 |
commit | 07d1ebb264bd4d6d6afab9513a8b00c3a615c16e (patch) | |
tree | 782f0fb2dfcf5d69950b8064c8cf7c4cf931dd7c /phpBB/includes/search | |
parent | f21f8ce03321e2a3e9033a66a1eb36ce2aae2ecd (diff) | |
download | forums-07d1ebb264bd4d6d6afab9513a8b00c3a615c16e.tar forums-07d1ebb264bd4d6d6afab9513a8b00c3a615c16e.tar.gz forums-07d1ebb264bd4d6d6afab9513a8b00c3a615c16e.tar.bz2 forums-07d1ebb264bd4d6d6afab9513a8b00c3a615c16e.tar.xz forums-07d1ebb264bd4d6d6afab9513a8b00c3a615c16e.zip |
*** empty log message ***
git-svn-id: file:///svn/phpbb/trunk@7186 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search')
-rwxr-xr-x | phpBB/includes/search/fulltext_native.php | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 4cb5a9f503..dcf240175a 100755 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -1221,14 +1221,21 @@ class fulltext_native extends search_backend } $db->sql_freeresult($result); - $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' - SET word_count = word_count - 1 - WHERE ' . $db->sql_in_set('word_id', $title_word_ids); - $db->sql_query($sql); - $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' - SET word_count = word_count - 1 - WHERE ' . $db->sql_in_set('word_id', $message_word_ids); - $db->sql_query($sql); + if (sizeof($title_word_ids)) + { + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count - 1 + WHERE ' . $db->sql_in_set('word_id', $title_word_ids); + $db->sql_query($sql); + } + + if (sizeof($message_word_ids)) + { + $sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . ' + SET word_count = word_count - 1 + WHERE ' . $db->sql_in_set('word_id', $message_word_ids); + $db->sql_query($sql); + } unset($title_word_ids); unset($message_word_ids); |