Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a table which contains 3 fie

Status
Not open for further replies.

FiveRand

Programmer
Apr 30, 2003
5
ZA
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):

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:
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
 
MATCH is only for fulltext, and you are trying perform a search on a single column. What you need is the following...

SELECT * FROM Biblio WHERE title LIKE '%searchString%'

This should return results from the database where the title column contains the searchString.

***************************************
J. Jacobs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top