title: SQL query isn't working as it should be
body: <p>I have the following mySQL query:</p>
  
  <pre><code>SELECT
      mp.*
    , m.*
  FROM missions_progress mp
  LEFT JOIN missions m ON mp.mid = m.id
  WHERE NOT EXISTS(
    SELECT
       mid
     , uid
    FROM missions_progress mp
    WHERE uid = {$uid} AND mstatus = 'completed'
  )
  </code></pre>
  
  <p>The issue is is that there are multiple rows in <code>'missions'</code> table, However if the player completes 1 mission, it doesn't load the other missions anymore.</p>
  
  <p>Here's how the SQL query should work,</p>
  
  <p>User opens missions.php page, and gets to see a list of missions they can do, if they start one, a row is inserted in mission_progress with mstatus = 'inprogress', if they completed this mission, the mstatus will be = 'completed' and the mission is finished. Taking them back to the mission page with the full missions list. However the last part isn't working, it says they've got 0 missions left, while there are at least 10+ rows in the missions table which they haven't done yet.</p>
  
  <p>Is there anyone that could point me in the right direction?</p>
  
  <p>Greatly appreciated.</p>