Hi,

The thing is, if the Outermost quote is single( ' ) , and if you try to use the same inside the string, in that case you need to go for \'. The same applies for Double quotes also. Double quotes within the single or single quote within the double dosen't reqire blackslash.

For instance,
mysql> select * from articles where match(title,body) against (' \'database\' ');
or can be like this
mysql> select * from articles where match(title,body) against (' "database" ');

Thanks
ViSolve DB Team.

----- Original Message ----- From: "William Langshaw" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Wednesday, November 29, 2006 12:54 AM
Subject: Full-text searching with quoted bind variables


I am using Full-Text searching with In Boolean Mode. I am generating
my query by using binding parameters. If a user types in a quoted
string on the search form (in order to match that string as-is), the
binding mechanism escape it with a backslash. The query runs fine and
it appears to return the same results when I run the same query  by
hand without the backslashes. I just want to make sure these
backslashes are not being interpreted differently and that the
full-text search engine is treating the double-quotes as they are
intended (and not looking for them literally)

E.g.

... AND MATCH (title, description) AGAINST ('chev* \"malibu\"' IN BOOLEAN MODE)

vs

... AND MATCH (title, description) AGAINST ('chev* "malibu"' IN BOOLEAN MODE)


They both seem to be Ok, but I just want to make sure now, before
wierd problems come up later...

thanks
-william

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to