title: JOIN MySQL doesn't work
body: <p>I've tried everything, but nothing works.. Even in an other code I wrote, it works. But for some reason it won't now.</p>
  
  <p>I want to join two tables where the ID = userID. When I load the page, I get this error:</p>
  
  <blockquote>
    <p>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
    result resource in
    /home/ynxwleus/domains/mustseenmovies.nl/public_html/films/userinfo.php
    on line 17</p>
  </blockquote>
  
  <p>Is there anyone who can help me with this problem?</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>$userID = $_SESSION['s_userID'];
          echo $userID;
          $query = "SELECT userID, userName, userFrontname, userSurname, filmID 
          FROM users
          JOIN seenIt
          ON users.userID = seenIt.userID 
          WHERE (userID ='$userID')";
  
          $res = mysql_query($query);
                  while ($row = mysql_fetch_array($res)) {
                      echo $row['userName'];
                      echo $row['userFrontname'];
                      echo $row['userSurname'];
                      echo $row['filmID'];
                  }
  </code></pre>
  
  <p>Thanks in advanced!</p>