<?
/*The results of this query will be ranked higher if:

    * It contains the word "mysql"
    * It doesn't contain the word "devArticles"
    * It contains one or more instances of the word "flash
    */
$db = mysql_connect("localhost", "mmaaaco_ksecor", "hamilton");
mysql_select_db("mmaaaco_mydb",$db);
$result = mysql_query("select firstName,details, match(details) against ('+mysql -devArticles >flash' in boolean mode) as relevance from testTable where
match(details) against ('+mysql -devArticles >flash' in boolean mode)",$db);
if (!result) echo mysql_error();
?>
<table>
	<tr><td colspan="4"><a name="top"><h3>Student Practice Queries</h3></a>
</td>
	</tr>
	<tr>
	<th align="left">Name</th>
	<th align="left">Relevance</th></tr>
 <? 
 // display list if there are records to display. The %s is a placeholder for each field you select below
 	if ($myrow = @mysql_fetch_array($result)) {

      

      do {

    echo "$myrow[firstName], $myrow[relevance] $myrow[details]";

      } 
      while ($myrow = mysql_fetch_array($result));
  }
  ?>
  </table>    