title: MySQL - Array in cell
body: <p>My scenario is that I have a table that stores classes at a school. Each class is a row in the table. One of the fields in there is the class period that the class is offered in. Some are only offered one period, some are offered multiple periods, some are offered every period.</p>
  
  <p>In the CSV I have that contains the data, the class period data, it is stored as a list of comma separated values with no spaces. For example, Algebra runs periods 1, 2, 3 and 4, so in the CSV its represented as "1,2,3,4".</p>
  
  <p>My issue is when it comes to query for, for example, all classes that run during 3rd period, something like <code>SELECT * FROM `classes` WHERE `period` LIKE '1'</code> won't find it. Adding wildcard <code>%</code> characters doesn't help because it also picks up classes that run during 11th period.</p>
  
  <p>How can I store these multiple values in the cell, and query for them?</p>
  
  <p>EDIT: This is all data I was provided. There are 200+ classes, so reformatting all the data into another table and using <code>JOIN</code> (which would be the proper way to do this), would be incredibly time consuming. I am looking for a way to work with the data in the format I already have it in.</p>