title: Downloading MySQL data based on array format?
body: <p>I've setup a MySQL database to to have dates and times of classes, eg:</p>
  
  <pre><code> class  |      class1      |      class2      |       class3       |
  --------------------------------------------------------------------
  physics | Tue@1@Mr. Foobar | Thu@4@Ms. Barfoo | Fri@1@Mr. Bobsmith |
  math    | Mon@4@Ms. Foobar | Tue@3@Ms. Barfoo | Fri@2@Mr. Lala     |
  cs      | Tue@2@Mr. Foobar | Fri@4@Ms. Barfoo |                    |
  </code></pre>
  
  <p>Basically, it's array formatted values in a database, which I planned on explode()-ing when required, but I didn't realize I'd have to do more fine grained searches.</p>
  
  <p>The array format is <code>Day@Period@Teacher</code></p>
  
  <p>For example, if today were Tuesday, how would you suggest I get all of Tuesday's classes in order, such as this:</p>
  
  <pre><code>Today's Classes
  1. Physics
  2. CS
  3. Math
  </code></pre>
  
  <p>Or should I just give up and separate out <code>class1</code> in to <code>class1day</code>, <code>class1period</code>, <code>class1teacher</code> ?</p>
  
  <p>My best idea is something along the lines of:</p>
  
  <pre><code>$date = $date("l");
  mysql_query("
  SELECT * 
  FROM classes 
  WHERE class1 OR class2 OR class3
  LIKE '$date%' ORDER BY //(I have no clue what to order by)
  ");
  </code></pre>
  
  <p>Cheers,
  any help greatly appreciated!</p>