Re: MySQL full text search

From: Date: Fri, 18 Jul 2003 11:53:29 +0000
Subject: Re: MySQL full text search
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-29329@lists.php.net to get a copy of this message
Full text searches only work against fulltext indexes. http://www.mysql.com/doc/en/Fulltext_Search.html This isn't a PHP issue. Doug On Fri, 18 Jul 2003 09:42:17 +0200, Angelo Zanetti wrote: >Hi > >I have a table which contains 3 fields (ID, Title, Abstract) the title and abstract fields have >been fulltext indexes like this: > >ALTER TABLE biblio ADD FULLTEXT (title,abstract); > >that worked fine, however my problem is whenever I want to do a select statement only comparing >1 of the columns to inputted data ( in a Select statement): > >$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title) AGAINST >('$searchString')"); > >It gives me this error: Can't find FULLTEXT index matching the column list. It appears that >i cant just compare a single fulltext indexed column if there are other fulltext indexed columns. >When I try it with both columns then it works but I just want to compare 1 column. eg: >$result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title, abstract) AGAINST >('$searchString')"); > >So is there anyway that I can just compare 1 column with text entered? Do I have t make some >sort of temporary table to do this? All the examples I have found show the select statement with 2 >columns or if they use 1 coumn its because there is only 1 column in their table. > >Any help would be appreciated! > >TIA > >Angelo >

« previous php.db (#29329) next »