title: Changing Specific Values in SQL Database Table (warning: long post and MySQL/db ignorance)
body: <p>I have a database ('db') and I've screwed up.  For some of the items I submit to the db (items == 'events'), I need to change two values, value_one and value_two.  But the value to which I change value_one depends entirely on the value of value_two.  It's a disaster, I know.  Please allow me to explain and please forgive my ignorance of SQL (and the fact that outside of MySQL, I could only solve this using Python).</p>
  
  <p>I have built a database to train a text classifier.  Each event within the database has a <code>category</code> (value_one) and a <code>sub_category</code> (value_two).  There are three categories (<code>nightlife</code>, <code>arts</code>, and <code>miscellany</code>) and four sub_categories (<code>live music</code>, <code>comedy</code>, <code>performance art</code>, and <code>visual art</code>).  </p>
  
  <pre><code>If `sub_category` == `live music` **OR** `comedy`, **THEN** `category` == `nightlife.`
  If `sub_category` == `performance art` **OR** `visual art`, **THEN** `category` == `arts.`
  If there were multiple sub_categories, then `sub_category` == `Multiple Sub Cats:
  ['sub_cat1', 'sub_cat2', 'sub_cat3']` 
  (often times `comedy` and `performance art,` for example) and `category` == `miscellany.`
  </code></pre>
  
  <p>Here's the problem: many <code>miscellany</code> submissions are wrongly classified, as the <code>sub_category</code> will read <code>Multiple Sub Cats: ['comedy']</code> or <code>Multiple Sub Cats: ['visual art'].</code>  Of course these should have been categorized as <code>nightlife</code> and <code>arts</code> and sub_categorized as <code>comedy</code> and <code>visual art</code> respectively.</p>
  
  <p>I realize now that I simply should have created multiple tables and that my submission logic was flawed.  Still, I really need some advice, as I have over 24,000 (of 30,000) events which may have been mis-categorized.</p>
  
  <p>My question is can I use MySQL syntax or Python to save it somehow??  I'm a bit over my skis here, so any suggestions (other than a reiteration that I suck) would be gratefully appreciated.</p>