title: PHP search engine isn't matching to specific term in MySQL database
body: <p>I have a simple search engine running on my website, but every time I search for a very specific term like "june 7" it shows everything related to "june" in the database. I can't figure out how to get my PHP search engine to call on a specific keyword from the database.. Help???</p>
  
  <p>Here is my code..</p>
  
  <pre><code>    &lt;?PHP
      function getmicrotime()
      {
   list($usec, $sec) = explode(" ", microtime());
  return ((float)$usec + (float)$sec);
   }
   //initializing connection to the database 
   $connection_string = dirname(__FILE__) . "/connectionstring.php";
   require_once($connection_string);
   //selecting table
    mysql_select_db("jaguartr_logins") or die ( 'Unable to select database.' );
   //max number of results on the page
   $RESULTS_LIMIT=1000;
   if(isset($_GET['search_term']) &amp;&amp; isset($_GET['search_button']))
   {
     $search_term = $_GET['search_term'];
  if(!isset($first_pos))
  {
      $first_pos = "0";
  }
  
  $start_search = getmicrotime();
  
  // initializing MySQL query  
  $sql_query = mysql_query("SELECT * FROM news WHERE MATCH(title,article) AGAINST('$search_term')");
  
  // additional check. Insurance method to re-search the database again in case of too many matches (too many matches cause returning of 0 results)
  if($results = mysql_num_rows($sql_query) != 0)
  {
      $sql =  "SELECT * FROM news WHERE MATCH(title,article) AGAINST('$search_term') LIMIT $first_pos, $RESULTS_LIMIT";
      $sql_result_query = mysql_query($sql);         
  }
  else
  {
      $sql = "SELECT * FROM news WHERE (title LIKE '%".mysql_real_escape_string($search_term)."%' OR article LIKE '%".$search_term."%') ";
      $sql_query = mysql_query($sql);
      $results = mysql_num_rows($sql_query);
  
      $sql_result_query = mysql_query("SELECT * FROM news WHERE (title LIKE '%".$search_term."%' OR article LIKE '%".$search_term."%') LIMIT $first_pos, $RESULTS_LIMIT ");
  }
  
  $stop_search = getmicrotime();
  
  //calculating the search time
  $time_search = ($stop_search - $start_search);
  }
  ?&gt;
  
  &lt;?PHP
     if($results != 0)
     {
  ?&gt; 
  </code></pre>