title: How to select column where value equals?
body: <p>I am trying to select the column where the value from a text input equals, i am being returned a value from the input and can echo it. But i cannot do a search and echo what column the value is in. i need to be able to echo the column name the value is in, and multiple if it is in more than one.
  Any help is appreciated.</p>
  
  <pre><code> $skw = $_POST['k'];
      if(isset($_POST['k'])){
      $connect = mysql_connect('*', '*', '*')or die('Could not execute command. Please contact a administrator.');
      mysql_select_db('*')or die('No database');
      $query = "SELECT * FROM *TABLE*
      WHERE A1 LIKE '%$skw%' 
      OR B1 LIKE '%$skw%' 
      OR C1 LIKE '%$skw%' 
      OR D1 LIKE '%$skw%' 
      OR E1 LIKE '%$skw%' 
      OR F1 LIKE '%$skw%' 
      OR G1 LIKE '%$skw%' 
      OR H1 LIKE '%$skw%' 
      OR I1 LIKE '%$skw%' 
      OR J1 LIKE '%$skw%'
      OR A2 LIKE '%$skw%' 
      OR B2 LIKE '%$skw%' 
      OR C2 LIKE '%$skw%' 
      OR D2 LIKE '%$skw%' 
      OR E2 LIKE '%$skw%' 
      OR F2 LIKE '%$skw%' 
      OR G2 LIKE '%$skw%' 
      OR H2 LIKE '%$skw%' 
      OR I2 LIKE '%$skw%' 
      OR J2 LIKE '%$skw%'
      OR A3 LIKE '%$skw%' 
      OR B3 LIKE '%$skw%' 
      OR C3 LIKE '%$skw%' 
      OR D3 LIKE '%$skw%' 
      OR E3 LIKE '%$skw%' 
      OR F3 LIKE '%$skw%' 
      OR G3 LIKE '%$skw%' 
      OR H3 LIKE '%$skw%' 
      OR I3 LIKE '%$skw%' 
      OR J3 LIKE '%$skw%'
      OR A4 LIKE '%$skw%' 
      OR B4 LIKE '%$skw%' 
      OR C4 LIKE '%$skw%' 
      OR D4 LIKE '%$skw%' 
      OR E4 LIKE '%$skw%' 
      OR F4 LIKE '%$skw%' 
      OR G4 LIKE '%$skw%' 
      OR H4 LIKE '%$skw%' 
      OR I4 LIKE '%$skw%' 
      OR J4 LIKE '%$skw%'
      OR A5 LIKE '%$skw%' 
      OR B5 LIKE '%$skw%' 
      OR C5 LIKE '%$skw%' 
      OR D5 LIKE '%$skw%' 
      OR E5 LIKE '%$skw%' 
      OR F5 LIKE '%$skw%' 
      OR G5 LIKE '%$skw%' 
      OR H5 LIKE '%$skw%' 
      OR I5 LIKE '%$skw%' 
      OR J5 LIKE '%$skw%'
      OR A6 LIKE '%$skw%' 
      OR B6 LIKE '%$skw%' 
      OR C6 LIKE '%$skw%' 
      OR D6 LIKE '%$skw%' 
      OR E6 LIKE '%$skw%' 
      OR F6 LIKE '%$skw%' 
      OR G6 LIKE '%$skw%' 
      OR H6 LIKE '%$skw%' 
      OR I6 LIKE '%$skw%' 
      OR J6 LIKE '%$skw%'";
      $result = mysql_query($query)or die(mysql_error());
          while($data = mysql_fetch_row($result)){
       echo("&lt;tr&gt;&lt;td&gt;$data[0]&lt;/td&gt;&lt;td&gt;$data[1]&lt;/td&gt;&lt;/tr&gt;");
      }}
  </code></pre>