title: (mysql) how to add wildcard on where condition when joining with another table?
body: <p>i have one query that need some changes, and i don't get any clue to do this :</p>
  
  <p>this is my query :</p>
  
  <pre><code>select * from user_data a
  left join user_group b 
  on (a.role like b.role)
  </code></pre>
  
  <p>actually role value in userdata is (varchar)<em>'staff'</em></p>
  
  <p>and role value in group is (varchar)<em>'staff;security;finance'</em></p>
  
  <p>so i don't get result what i expected ..</p>
  
  <p>i imagine the query should be similar to this :</p>
  
  <pre><code>select * from user_data a
  left join user_group b 
  on (b.role like a.role+";%") // using wildcard
  </code></pre>
  
  <p>and i still don't know the right query using wildcard to this case</p>
  
  <p>any one can help?</p>