title: Why does only one column appear in my PHP search results output?
body: <p>I have a search.php page that successfully searches a database called "sixcols" and displays the correct number of results.  But suddenly, it only displays information from the first column of each result. No matter which of the six types of columns I list first in the code, only that column appears. I have no idea why all 6 aren't appearing.</p>
  
  <p>I know mysql_fetch_array is becoming depracated, but I swear this worked this morning and I don't know what I changed. </p>
  
  <p>I've searched for 2 hours for a typo or an explanation and I can't figure it out. Any help is much appreciated!</p>
  
  <p>Here's the code: </p>
  
  <pre><code>&lt;?php
  
  error_reporting(E_ALL);
  ini_set('display_errors', '1');
  
  $search_output = "";
  if(isset($_POST['searchquery']) &amp;&amp; $_POST['searchquery'] != ""){
  $searchquery = preg_replace('#[^a-z 0-9?!]#i', '', $_POST['searchquery']);
  $sqlCommand = "SELECT Subcategory, Type, Author, Summary, Date, Source FROM sixcols WHERE Author LIKE '%$searchquery%' OR Summary LIKE '%$searchquery%'";
  
          include_once("connect.php");
  
  $query = mysql_query($sqlCommand) or die(mysql_error());
  
  $count = mysql_num_rows($query);
  if($count &gt; 1){
  $search_output .= "&lt;hr /&gt;$count results for &lt;strong&gt;$searchquery&lt;/strong&gt;&lt;hr /&gt;";
  while($row = mysql_fetch_array($query)){
  
              $Subcategory = $row["Subcategory"];
              $Type = $row["Type"];
              $Author = $row["Author"];
              $Summary = $row["Summary"];
              $Date = $row["Date"];
              $Source = $row["Source"];
     $search_output .= '&lt;br/&gt; &lt;span class="subcategory"&gt;' . $Subcategory . '&lt;/span&gt;'; '&lt;span class="type"&gt;' . $Type . '&lt;/span&gt;'; '&lt;span class="author"&gt;' . $Author . '&lt;/span&gt;'; '&lt;span class="summary"&gt;' . $Summary . '&lt;/span&gt;'; '&lt;br/&gt; &lt;span class="date"&gt;' . $Date . '&lt;/span&gt;'; '&lt;span class="source"&gt;' . $Source . '&lt;/span&gt;';
                  } // close while
  } else {
  $search_output = "&lt;hr /&gt;0 results for &lt;strong&gt;$searchquery&lt;/strong&gt;&lt;hr /&gt;$sqlCommand";
  }
  }
  ?&gt;
  </code></pre>