I believe this is what is happening as I only have a few test rows.
]]>Returns nothing, not working
1.) SELECT Id, DocSearchDump, DocName, DocKeywords, DocDescription, MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’) AS score FROM doc_info WHERE MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’) ORDER BY score DESC
WORKS: Returns 2 results
2.) SELECT Id, DocSearchDump, DocName, DocKeywords, DocDescription, MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’ IN BOOLEAN MODE) AS score FROM doc_info WHERE MATCH(DocName, DocKeywords, DocSearchDump, DocDescription) AGAINST (’Work Order Reasons’ IN BOOLEAN MODE) ORDER BY score DESC
You can also try running the Query manually through MySQL or even PHPMyAdmin to see if your SQL syntax is off.
]]>My code:
$search=$_GET[’search’];
$query = “SELECT *, MATCH (title, description, url) AGAINST (’$search’) AS score FROM links WHERE MATCH (title, description, url)
AGAINST (’$search’)”;
$result = mysql_query($query) or die(mysql_error());
any ideas ? Thanks
]]>thank you so much for this… and also thanks to those awesome people at MySQL. =)
]]>One question though… Is there any straight forward way of applying weighting to certain columns?
For example, if my columns are “title” and “article”, I would like matches in the title column to be more relevent than matches in the article column…
]]>