MySQL Forums
Forum List  »  Full-Text Search

Using non static string in the AGAINST part
Posted by: Rickard Engström
Date: March 18, 2009 05:06AM

Hi

I have a question for you MySql people. Since I'm quite new to MySql and particularly to Full text search matters, I need to know if I'm right in this. Read somewhere that you can only use static strings in the AGAINST part, as in the firast example below:

---------------
SELECT id, header, MATCH(header,content) AGAINST('Supernova') AS score
FROM tbl_stellar WHERE MATCH(header,content) AGAINST('Supernova');
---------------

which should mean that this is not possible:
---------------
SELECT id, header, MATCH(header,content) AGAINST(myVariable) AS score
FROM tbl_stellar WHERE MATCH(header,content) AGAINST(myVariable);
---------------

The above examples assumes that the proper table and Full text index are created and that the second one is for example called from within a stored procedure with myVariable as IN parameter.

Can someone please give me a hint in this?

Regards, Rickard

Options: ReplyQuote


Subject
Views
Written By
Posted
Using non static string in the AGAINST part
4192
March 18, 2009 05:06AM


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.