MySQL full text search
| From: | Angelo Zanetti | Date: | Fri, 18 Jul 2003 07:42:17 +0000 |
| Subject: | MySQL full text search | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29321@lists.php.net to get a copy of this message | ||
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