PHP/MYSQL match against query

user1260310 picture user1260310 · May 30, 2012 · Viewed 8.4k times · Source

I am trying to run a match against query and it is not working. I created a full text index on the two fields. But am getting sql error right before word 'relationship". Here is sql:

"SELECT * FROM pages WHERE MATCH (shdescript,ldescript) AGAINST (romance, relationship)";

I have also tried just searching against shdescript and just searching against ldescript but get same error. Also I've tried searchstring without spaces. As far as I know, you are supposed to have the words of the searchstring separated by commas in parentheses. What am I doing wrong? Thanks.

Answer

Scott Saunders picture Scott Saunders · May 30, 2012

Add quotes around your search string.