I am working on site search engine i am able to do searches, now i want to modify query so as to make a smart search.
I am writing my query like this
require_once('../global/connect.php');
$db = mysql_select_db($database,$connection) or trigger_error("SQL", E_USER_ERROR);
$sqlquery = mysql_query("SELECT title FROM test_table WHERE MATCH (title) AGAINST ('%keyword*%' IN BOOLEAN MODE) ")or die (mysql_error());
while($row=mysql_fetch_assoc($sqlquery)){
echo $row['title'];
echo"</br>";
}
I want a search functionallity that can search like.
if user type any of these keywords
KEYWORDS
KEY-WORDS
KEY-WORDS
KEY WORDS
KEYWORD
KEYWOR
result should be same.
I have looked around many question here like this. and goggled it, also looked at MySQL developer website here, but i cant get any idea how to modify my query to get it work.
Please suggest any possible approach to this.
Thanks.