title: Query only displaying one result
body: <p>I have the following query that all along I thought my while loop was not working, but it turns out my query is only outputting one record. </p>
  
  
  
  <pre class="lang-sql prettyprint-override"><code>SELECT up.ordering, u.id, u.username, up.playername 
  FROM users AS u 
  INNER JOIN playersByUser AS up ON u.id = up.userid 
  WHERE u.group IN (3,4,5)
  ORDER BY up.ordering
  </code></pre>
  
  <p>It should be outputting several and I am unsure why it is only getting one. I'm trying to select the id's from both the users and playersByUser table where the group is 5 in the users table. Then output the username.</p>
  
  <p>playersByUser</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE `playersByUser` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `userid` int(11) DEFAULT NULL,
   `playername` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
   `ordering` tinyint(4) DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `userid` (`userid`),
   CONSTRAINT `playersByUser_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `users` (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
  </code></pre>
  
  <p>users</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE `users` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `firstname` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
   `lastname` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
   `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
   `phone_number` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
   `username` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
   `password` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
   `salt` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
   `joined` datetime NOT NULL,
   `group` int(11) NOT NULL,
   PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_c
  </code></pre>
  
  <p>The data that can be used is this:</p>
  
  <p>users   </p>
  
  <pre class="lang-sql prettyprint-override"><code>id  firstname lastname   email            phone_number username  password salt   joined    group
  1   name1     lastname1  email@email.com  555-555-5555 testSQL   fdfdf     acc     9-3-15   5
  2   name2     lastname2  email2@email.com 555-555-5556 testSQL2  fdfdf     dcc     9-3-15   5
  </code></pre>
  
  <p>playersByUser</p>
  
  <pre class="lang-sql prettyprint-override"><code>id userid playername ordering
  1    1        Bob       1
  2    2        Dave      1
  </code></pre>