title: MYSQL: Retrieve all rows from one column containing multiple data
body: <p>I've looked online for about two days and I'm not sure how to ask Google this scenario.  I'm trying to pull all rows from a single column that contain the word 'Helmet'.  What I'm getting is only 2 rows.  There's actually about 10 rows but it contains words like 'Legs, Helmet'  The rows that only have the word 'Helmet' are populating correctly.  Code I'm using.</p>
  
  <pre><code>  id | rune_slot
    ---------------------------------
    0  | Shoulders
    ---------------------------------
    1  | Chest
    ---------------------------------
    2  | Main Hand, Off Hand, Ranged
    ---------------------------------
    3  | Helmet
    ---------------------------------
    4  | Legs, Helmet
    ---------------------------------
    5  | Helmet
    ---------------------------------
    6  | Legs, Helmet
    ---------------------------------
  </code></pre>
  
  <p>As you can see, this is my table.  Like I said, I'm getting rows 3 and 4, but I can't seem to get rows 4 and 6 also.</p>
  
  <pre><code>$conn = mysql_connect($dbhost, $dbuser, $dbpass);
  if(! $conn )
  {
        die('Could not connect: ' . mysql_error());
  }
  $sql = 'SELECT * FROM runes WHERE rune_slot LIKE "Helmet"' ;
  
  mysql_select_db('runelist');
  $retval = mysql_query( $sql, $conn );
  if(!$retval )
  {
        die('Could not get data: ' . mysql_error());
  }
  while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
  {
        echo "Rune Name : {$row['rune_name']} "." Craft Level :  {$row['craft_level']} "."   Rune Slot : {$row['rune_slot']} ".
        "&lt;br /&gt;";
  } 
  echo "Fetched data successfully\n";
  mysql_close($conn);
  </code></pre>
  
  <p>This is the code I got from <a href="http://www.tutorialspoint.com/php/mysql_select_php.htm" rel="nofollow">http://www.tutorialspoint.com/php/mysql_select_php.htm</a> . </p>
  
  <p>I've tried as many different select statements that I know of. I've tried changing mysql_fetch_array to _assoc and I've browsed the <a href="http://www.php.net/manual/en/function.mysql-fetch-assoc.php" rel="nofollow">http://www.php.net/manual/en/function.mysql-fetch-assoc.php</a> .  I'm guessing it's bad practice to put multiple data in a single column?  Any help would be appreciated, I come here often to learn about PHP and MYSQL, now I'm just stuck.  Thanks!!</p>