title: retrieve data using INNER JOIN not expecting result
body: <p>I am looking for someeklse to cast an eye on my query, basically I am wanting to get a  list of users whentheir user_id is apart of a group table. I have three tables:</p>
  
  <pre><code>users
    user_id
  
  groups
    group_id
  
  user_group_join
    user_id
    group_id
  </code></pre>
  
  <p>So, I am wanting to get out the users names from the rows from the <code>user_group_join</code> table.</p>
  
  <pre><code>&lt;?php
  
  $q = "SELECT users.OrderID, user_group_join.user_id, users.first_name
  FROM users
  INNER JOIN user_group_join
  ON users.user_id=user_group_join.user_id";
  
  $r = mysqli_query($dbc, $q);
  
  while ($row = mysqli_fetch_array($r)) {
      echo'&lt;p&gt;' . $row['user_name'] . '&lt;/p&gt;';
  };
  
  ?&gt;
  </code></pre>
  
  <p>I have tried to execute the above and getting no results I am expecting, mainly errors like:</p>
  
  <pre><code>Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\Program Files\Ampps\www\admin\new_doc.php on line 16
  </code></pre>