title: LIKE function SQL
body: <p>I've been using the function <code>LIKE</code> in this statement however its not doing what I expected for it to do, Basically a user on my site has a <code>subject</code> which usually looks like this <code>hello welcome to my #room hows it going #fun</code> and what im using is the <code>LIKE</code> function to select all users with the <code>subject</code> containing <code>#fun</code> my statement looks like this;</p>
  
  <pre><code>$search = 'fun';
  $sql = "SELECT * FROM `usr_users` WHERE `subject` LIKE '%$search%'";
  $result = mysql_query($sql);
  while ($row = mysql_fetch_assoc($result)) {
      echo $row['username'];
  }
  </code></pre>
  
  <p>however when the query runs it only selects the users which have fun at the begining of their <code>subject</code> or not at all. is there a different function I can use to select words from within in the <code>subject</code> not just the first word.</p>