MySQL Forums
Forum List  »  Quality Assurance

MATCH AGAINST and a String that is actually a number
Posted by: azmath moosa
Date: January 14, 2008 12:58PM

Hey, i'm having a problem with MATCH() AGAINST()

I have a table with a column called "partners" which is a TEXT type but it stores numbers in the form of text.

For example: "3, 2, 1," like that w/o the quotes.

Now, i store them as text coz i'm kinda like storing an Array from PHP into this. But anyways thats not an issue at all. Everything is fine here.

Now, i want to retrieve all the rows where the column "Partners" contains "3". So, i used the MATCH AGAINST() function but they don't seem to work. This is my syntax:

select * from csp WHERE MATCH(partners) AGAINST ('3,' in boolean mode);

I dont get any rows returned at all. I also learned that MATCH()AGAINST() cannot be used for numbers but i suppose that since the "number" is stored in a string field (type=TEXT), it wont be a problem.

So where is the problem? How can i fix it? Is there any other function in MySQL that can be used other than MATCH() AGAINST()?

My Main Goal: To retrieve all the rows, the columns of which contain the string "3,".

PS: My tables are MyISAM type.

Options: ReplyQuote


Subject
Views
Written By
Posted
MATCH AGAINST and a String that is actually a number
13276
January 14, 2008 12:58PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.