Index: trunk/kernel/include/searchitems.php =================================================================== diff -u -N -r964 -r1019 --- trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 964) +++ trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 1019) @@ -514,12 +514,12 @@ $SelectSQL .= " AND (ResourceId IN (".implode(",",$idlist)."))"; } } - $SelectSQL .= "GROUP BY $idField "; + $SelectSQL .= " GROUP BY $idField "; //echo $SelectSQL."

\n"; - if($InitTable) - { + if($InitTable = TRUE) + { $this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$this->ResultTable); //$indexSQL = "(INDEX(Relevance), INDEX(ItemId), INDEX(ItemType), INDEX sorting (EdPick,Relevance)) "; $full_sql = "CREATE TABLE ".$this->ResultTable." ".$indexSQL.$SelectSQL; @@ -604,6 +604,7 @@ break; $exact_word=substr($phrase, $i+1, ($exact_match_close-$i)-1); $exact_word = str_replace("\\", "", $exact_word); + $exact_word = trim($exact_word); $i=$exact_match_close; if($exact_word) {