RE: [PHP-DB] MySQL fulltext indices and phrase search

From: Date: Wed, 02 May 2001 21:57:34 +0000
Subject: RE: [PHP-DB] MySQL fulltext indices and phrase search
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51199@lists.php.net to get a copy of this message
try something like splitting the keywords using the php-command split(...) using a space as a separator and then search for a string matching all the words using "SELECT from table WHERE string LIKE "%foo%" AND string LIKE "%bar%"; > -----Original Message----- > From: Jens Kisters [mailto:newsletters@rosomm-partner.de] > Sent: Mittwoch, 2. Mai 2001 20:13 > To: PHP-DB Mailingliste; php-general@lists.php.net > Subject: [PHP-DB] MySQL fulltext indices and phrase search > > > Hi there, is there a possibility to use MySQL's MATCH ... AGAINST to > look for a string like "foo bar" ? > > if i MATCH keyname AGAINST ('foo bar') i get resuts that match foo or > bar, but not both of them separated by a space. > > My guess is that the organization of the index doesn't allow this kind > of search as it's based on single words , but maybe one of you has a > better idea than > to select the rows that contain both and hit those with LIKE '%foo bar%' > > -- > Grüße aus dem schönen Kleve > Jens Kisters > > rosomm et partner > Agentur für neue Medien GmbH > Dienstleistungszentrum am > Weißen Tor - Eingang B > Gocher Landstrasse 2 > 47551 Kleve / Bedburg-Hau > > Telefon: 02821 - 97856-20 > Telefax: 02821 - 97856-77 > j.kisters@rosomm-partner.de > http://www.rosomm-partner.de > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#51199) next »