|  PHP ver gevorderde |  | Hallo iedereen, 
 Ik ben bezig met een fulltext search, alleen als je artikels zoekt, en je zoekt op meer dan 1 woord, dan moeten beide woorden voorkomen. Ik heb nu dit:
 
 
 
    
    
        
            
                <?php
$query = "SELECT s.`title`, t.`id`
FROM `info_tosearch` s INNER JOIN `info_text` t
ON(s.`textid`=t.`id`)
WHERE MATCH (s.`title`, t.`text`) AGAINST ('+(".$good.")' IN BOOLEAN MODE)";
?> <?php$query = "SELECT s.`title`, t.`id`FROM `info_tosearch` s INNER JOIN `info_text` tON(s.`textid`=t.`id`)WHERE MATCH (s.`title`, t.`text`) AGAINST ('+(".$good.")' IN BOOLEAN MODE)";?>
   
 In $good staan alle woorden gescheiden met een spatie (de waarde is correct als ik echo doe).
 
 Alleen krijg ik dan resultaten die enkel database bevatten. Ook dit helpt niet:
 
 
 
    
    
        
            
                <?php
$query = "SELECT s.`title`, t.`id`
FROM `info_tosearch` s INNER JOIN `info_text` t
ON(s.`textid`=t.`id`)
WHERE MATCH (s.`title`, t.`text`) AGAINST ('+[woord1] +[woord2]' IN BOOLEAN MODE)";
?> <?php$query = "SELECT s.`title`, t.`id`FROM `info_tosearch` s INNER JOIN `info_text` tON(s.`textid`=t.`id`)WHERE MATCH (s.`title`, t.`text`) AGAINST ('+[woord1] +[woord2]' IN BOOLEAN MODE)";?>
   
 Wat gaat er fout?
 
 Edit: Opgelost, ik zocht op een woord korter dan 4 letters en dat negeerde fulltext.
 |