Forum Moderators: coopster
$selectCondition = "title, article"; //working
$selectCondition = "title, article, description, keywords"; //no results
$searchString = "user entered query";
$query = "SELECT *, MATCH($selectCondition) AGAINST ('$searchString') AS score FROM tbl_data WHERE MATCH($selectCondition) AGAINST('$searchString') limit 300";
Thanks in advance.
Is your $searchString too vague or your table too small to handle a vague search? adding description and/or keywords may force mysql to try to receive more than half the records in your table. If this is the case, mysql will retrieve 0 records by default.
have you tried the query against description or keywords alone?
add print mysql_error(); after your mysql_query() to see if there is an error in your script.