title: Find match in database with php and mysql
body: <p>So this is the problem for which I need solving: Users in my database are following a certain amount of courses. These courses are all numbered, so the value of the row <code>courses</code> could be <code>12, 34, 56</code> or <code>12</code> or '', etc. Now I'm doing a search query to find users that are following a certain course. I was thinking about using <code>LIKE</code>, but it seems like an impractical solution, because then I have to match it as follows: </p>
  
  <p><code>courses LIKE '$course,%' OR courses LIKE '%,$course,%' OR courses LIKE '%,$course' OR courses LIKE '$course'</code></p>
  
  <p>Since there are four different ways to match, I was hoping for a better solution, but haven't thought of anything yet myself. Anybody with a creative solution? Thanks a mil. </p>