this is what it does right now which is what I want to change:
global $dbHost, $dbUser, $dbPass, $dbName;
$countries="='us'";
$kwrds = "";
$beginning = true;
if (!$link = @mysql_connect("$dbHost", "$dbUser", "$dbPass")) {echo "Sorry, some trouble connecting to the dadabase.<BR>Please try again later.<BR>If this problem persists please contact the <a href=\"mailto:webmaster@cwnol.com\">webmaster</a><BR>Thank you.";}
else {
$KeywordArray=explode(",",$sb);// take the keywords between commas 1 by 1
// the loop below puts together the mysql query
foreach ($KeywordArray as $kwa) {
$kwa=trim($kwa);
if ($beginning) {$kwrds = "keywords LIKE '%$kwa%' OR about LIKE '%$kwa%'";}
else {$kwrds .= " OR keywords LIKE '%$kwa%' OR about LIKE '%$kwa%'";}
$beginning=false;
}//End foreach ($KeywordArray as $kwa)
$result = mysql("$dbName","SELECT userID FROM lilypages WHERE $kwrds AND country$countries");
$number_of_rows = mysql_num_rows($result);
the code above works with out any technical problems.
the only thing is that it doesn't sort the results by order of relevance (which cannot be ignored) , so i changed it to the code below, and that's where I get the error.
$result = mysql("$dbName","SELECT * FROM dbtable WHERE MATCH (compname,keywords,about) AGAINST ('$inputBox')");
$number_of_rows = mysql_num_rows($result);
hope this helps
thank u 4 ur responce
Panos A