views:

213

answers:

3

How can I serach word with "&" using mysql full text search ?

There are words string, like "Marks & Spencer", "at&t" in my tables , serach "at&t", but can't find it on the database using mysql full text search

Any ways to serach word with "&"?

A: 

I don't think it is possible. "&" is treated as an operator: http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

There used to be a bug filled for this exact thing: http://bugs.mysql.com/bug.php?id=26265

fikovnik
SeanJA
Basically I don't think there is a way you can escape it.
fikovnik
A: 

Take a look at: mysql_real_escape_string().

jjclarkson
SeanJA
A: 

solved it. Just using REPAIR TABLE

Jason
Can you elaborate? (For the record)
jjclarkson
I would be also very interested how REPAIR TABLE helped you to solve this?
fikovnik
set up configuration: set up minimum word length value as 1; and then REPAIR TABLE; That is what we did
Jason