title: Use comma separated list from one table as clause in query for another table
body: <p>I have an <code>events</code> table with a field called <code>breaks</code>. This is populated with data in a comma separated format, i.e. <code>1,2,3</code> or <code>1</code> or <code>1,4,5</code> - the same format that MySQL's <code>IN</code> command uses.</p>
  
  <p>I'd then like to run a query - on the <code>slots</code> table - to return all rows apart from those specified in <code>events.breaks</code>.</p>
  
  <p>The query, theoretically, should be something like this:</p>
  
  <pre><code>SELECT
      `slots`.`id` AS id,
      RIGHT(`slots`.`time`, 8) AS `time`
  FROM
      `slots`, `event`
  WHERE
      `slots`.`id` NOT IN (`event`.`breaks`)
  </code></pre>
  
  <p>But that doesn't appear to work - if <code>event.breaks</code> is <code>4,5,7</code>, the only row from the <code>slots</code> table that doesn't return is <code>4</code>!</p>
  
  <p>SQLFiddle here: <a href="http://sqlfiddle.com/#!2/913fe/1/0" rel="nofollow">http://sqlfiddle.com/#!2/913fe/1/0</a></p>