title: MySQL Select Statement, WHERE 'IN' Clause
body: <p>I currently have the following row in my table:</p>
  
  <pre><code>         course_data:
               user_id        days     &lt;-- This is a varchar column.
                 405          1,3,5
  </code></pre>
  
  <p>and I am trying to implement the following SELECT statement:</p>
  
  <pre><code>SELECT usrID, usrFirst, usrLast, usrEmail
      FROM tblUsers
      WHERE usrID NOT IN
      (
          SELECT users.usrID
              FROM
                  `course_data` courses,
                  `tblUsers` users
              WHERE
                  days IN ('$day')
      )
      GROUP BY usrID
      ORDER BY usrID
  </code></pre>
  
  <p>Basically, I want that row (with user 405) to be omitted if the $day variable includes a '1, 3, or 5'.  </p>
  
  <p>For example, if <code>$day = "1"</code>, it should return an empty query (because the number "1" is in the column "1,3,5").</p>
  
  <p>However, I have not found this to be the case.  Even though <code>$day = "1"</code>, it still returns that row.</p>
  
  <p>The only way that it won't return the row is if <code>$day= "1,3,5."</code>  Yet, I thought that the IN() clause would take any part of my variable and apply it to that column.</p>
  
  <p>Any insights on what I'm doing wrong here?  Thanks.</p>