MySQL match againts FULLTEXT search

CHT

New member
Are you attempting to do this statement outside of the db it's supposed to work in? If so, there's your problem.
 

leeterthanu

New member
Thanks for your reply

I actually solved it yesterday, it was annoying but I found the solution for it.

You first have to give fulltext key or whatever with an ALTER TABLE table ..... command
And you have this to do for all you columns you want to search in.
 

CHT

New member
leeterthanu said:
Thanks for your reply

I actually solved it yesterday, it was annoying but I found the solution for it.

You first have to give fulltext key or whatever with an ALTER TABLE table ..... command
And you have this to do for all you columns you want to search in.

Uh, do you understand what ALTER TABLE does? I find it hard to believe it should be used for a search query.
 

smalpierre

New member
CHT said:
leeterthanu said:
Thanks for your reply

I actually solved it yesterday, it was annoying but I found the solution for it.

You first have to give fulltext key or whatever with an ALTER TABLE table ..... command
And you have this to do for all you columns you want to search in.

Uh, do you understand what ALTER TABLE does? I find it hard to believe it should be used for a search query.

ALTER TABLE is how one might add the fulltext indexes to the field? I don't think the intent was to try to use it in a select query. You use ALTER TABLE to add the indexes, then it'll work with that query. Note to noobs - you only have to do that once, then it's got the index.
 

CHT

New member
smalpierre said:
ALTER TABLE is how one might add the fulltext indexes to the field? I don't think the intent was to try to use it in a select query. You use ALTER TABLE to add the indexes, then it'll work with that query. Note to noobs - you only have to do that once, then it's got the index.

Rather, ALTER TABLE allows one to modify a table in a database as selected, in nearly any way that is possible by SQL. This even includes adding and dropping of columns.
Using ALTER TABLE to add indexes instead of doing it when using CREATE INDEX alongside CREATE TABLE however is bad practice. Why you don't do it during table creation is beyond me though.

I'm going off-topic here, so PM me if you want to continue down this line of discussion.