mysqlmatchagainst

PHP/MYSQL match against query


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.


Solution

  • Add quotes around your search string.