Forum Moderators: coopster
I have a Mysql Boolean Full Text search on one of my sites which uses the following code:-
$Query = "SELECT * from $TableName where match (data) against ('+keyword, +keyword1' IN BOOLEAN MODE)";$Result = mysql_db_query ($DBName, $Query, $Link);
while ($Row = mysql_fetch_array ($Result)){
echo etc etc
Which works fine - the Data I require from the table is stored in the $Row Array and I can pull this data and write it to the document.
However, I want to order the results by relevance so the code has been changed to:-
$Query = "SELECT match (data) against ('keyword, keyword1') as Relevance from $TableName Where Match (data) against ('+keyword, +keyword1' IN BOOLEAN MODE) HAVING Relevance > 0.2 Order by Relevance Desc";$Result = mysql_db_query ($DBName, $Query, $Link);
while ($Row = mysql_fetch_array ($Result)){
echo etc etc
Now though the $Row array contains the relevance score rather than the data from the table. :(
Any ideas where the data from the table is now stored or where I have gone wrong?