title: What is a dot (.) supposed to do in MySQL queries?
body: <p>I am trying to figure out why when I enter a dot (.) into my search, it highlights every single character of the search results (it wraps each character in a <code>&lt;span class="search-highlight"&gt;&lt;/span&gt;</code>) and it's also only showing 3 tickets which is weird because all of them have at least one dot in them:</p>
  
  <p><img src="https://i.stack.imgur.com/gH3A1.png" alt="screenshot"></p>
  
  <p>The query that does the actual searching (along with the variables) is: </p>
  
  <pre><code>$q = mysql_real_escape_string($_GET['q']);
  $query = trim(strtoupper($q));
  $query = htmlentities($query, ENT_QUOTES, "UTF-8");
  $construct = $is_employee==false ? "user='$userid' AND" : "";
  $tickets_result = mysql_query("SELECT `id`, `subject`, `message`, `timestamp`, `user` FROM `tickets` WHERE $construct (upper(subject) LIKE '%".$query."%' OR upper(message) LIKE '%".$query."%')") or trigger_error(mysql_error());
  </code></pre>
  
  <p>And my <code>highlight</code> class:</p>
  
  <pre><code>class highlight
      {
          public $output_text;
  
          function __construct($text, $words) {
              $split_words = explode(" ", $words);
              foreach ($split_words as $word) {
                  $text = preg_replace("|($word)|Ui",
                          "&lt;span class=\"search-highlight\"&gt;$1&lt;/span&gt;", 
                          $text);
              }
              $this-&gt;output_text = $text;
          }
      }
  </code></pre>
  
  <p>Does anyone know why or how a simple dot (.) would cause this and is it possible to fix?</p>
  
  <p>Thanks for any help in advance.</p>