title: MYSQL multiselect with subselect in where
body: <p>Hi I have the following tables:</p>
  
  <ol>
  <li><code>user</code> with colums <code>id, first_name, last_name, etc...</code></li>
  <li><code>meeting</code> with colums <code>id, meeting_name, etc...</code></li>
  <li><code>enroled</code> with colums <code>id, user, meeting, enrol_date, disenrol_date</code></li>
  </ol>
  
  <p>When user do enrol to meeting, I create a new row in the table <code>enroled</code> with <code>id</code>, <code>user_id</code> and <code>enrol_date</code> (timestamp)<br>
  and when user do disenrol I write timestapmp of disenrol to <code>disenrol_date</code> column.<br>
  (but when user do enrol->disenrol->enrol = I have 2 rows in table <code>enroled</code>)<br></p>
  
  <p>I need select all user when not enroled to meeting (I have it in first section of where) and all user disenroled form all row of this meeting(All rows of the user for that meeting have a disenrol column filled in).</p>
  
  <p>Actual I have:</p>
  
  <pre><code>SELECT user.id, user.last_name, user.first_name
  FROM user
  WHERE 
      // not enroled
      user.id NOT IN 
              (SELECT enroled.user FROM enroled 
                      WHERE enroled.meeting='".$res['id']."'
                      GROUP BY enroled.user)
  
      AND
      // full_disenroled
      /// I dont understand how this spec.
  
  ORDER BY user.Last_name ASC
  </code></pre>