title: Expiring a value based on a date field
body: <p>I have a table called <code>course offerings</code>. In this table you will find each course with its respective <code>course_start_date</code> and <code>course_end_date</code>.  I am also using an enum field called <code>course_status</code>. There are two possible status for each course <code>IN SESSION</code> or <code>Closed</code> but not both. How could I create a query that will change the status to <code>Closed</code> if it is passed its <code>course_end_date</code>? <a href="http://sqlfiddle.com/#!2/812d1" rel="nofollow">SQLFIDDLE</a> </p>
  
  <pre><code>CREATE TABLE course_offerings 
      (
       id int auto_increment primary key, 
       course_name varchar(20), 
       course_start_date date,
       course_end_date date,
       course_status enum('CLOSED','IN SESSION')
      );
  
  INSERT INTO course_offerings
  (course_name, course_start_date, course_end_date, course_status)
  VALUES
  ('Math', '2013-02-20', '2014-02-20', 'IN SESSION'),
  ('Science', '2013-02-20', '2014-04-18', 'IN SESSION');
  </code></pre>