USE {PHP} BB TAGS.
Code:
<?php
...
//connect to your database ** EDIT REQUIRED HERE **
mysql_connect("hidden","hidden","hidden"); //(host, username, password)
//specify database ** EDIT REQUIRED HERE **
mysql_select_db("hidden") or die("Unable to select database"); //select which database we're using
// Build SQL Query
$query = "SELECT MATCH (*) AGAINST (\"%$trimmed%\") AS score FROM nk_table WHERE MATCH (title,body) AGAINST (\"%$trimmed%\");
order by score"; // EDIT HERE and specify your table and field names for the SQL query
// `
$numresults=mysql_query($query);
$numrows=mysql_num_rows($numresults);
// If we have no results, offer a google search as an alternative
...
?>
Changed the query to display by relevancy, may or may not work.
For future reference:
http://dev.mysql.com/doc/refman/5.0/...xt-search.html
Bookmarks