title: mySQL JOIN ON NOT()? Possible
body: <p>Is it possible to JOIN in a query and use a NOT IN() clause?</p>
  
  <p>What I have is</p>
  
  <pre><code>SELECT DISTINCT loc.*, 
          a.firstname, 
          a.lastname,
          a.profileimg,
          (((acos(sin((37.2790669*pi()/180)) * sin((`latitude`*pi()/180))+cos((37.2790669*pi()/180)) * cos((`latitude`*pi()/180)) * cos(((-121.874722 - `longitude`)*pi()/180))))*180/pi())*60*1.1515) AS `distance` FROM memb_geo_locations loc 
                  JOIN memb_baseInfo a ON a.mID = loc.mID
  
                  JOIN memb_friends c ON (c.mID = loc.mID OR c.friendID = loc.mID) AND (c.mID = 21 OR c.friendID = 21)
                  WHERE loc.primaryAddress = '1'
                  AND loc.mID NOT IN(21)
                  HAVING `distance` &lt; 25 ORDER BY `distance` ASC LIMIT 0, 25
  </code></pre>
  
  <p>I need this line</p>
  
  <pre><code>JOIN memb_friends c ON (c.mID = loc.mID OR c.friendID = loc.mID) AND (c.mID = 21 OR c.friendID = 21)
  </code></pre>
  
  <p>to act as a NOT IN() cause I am trying to exclude people from the results that are "friends"
  on the memb_friends table both column mID and friendID are in a sense the same number. Dependant upon who initiated the request for a friendship. So lets say my ID is 21 I can either be the friendID or the mID on that table and someone else's ID is the counterpart. I have 10 friends on my list lets say, and 1000 people in my database. So the conclusion should be I have 990 results to work with after the query is done, but Im stuck on this one, either how to JOIN the table in for use with the query and then how to exclude from there.</p>