title: PHP/MYSQL - "ORDER BY" Doesn't work
body: <p>I have a table with a bunch of users who have a certain amount of points. I would like to arrange the users from highest points first to the lowest. However ORDER BY PTS DESC doesn't work.</p>
  
  
  
  <pre><code>                    &lt;tr&gt;
                          &lt;th id="users_th1"&gt;&lt;img src="&lt;?php echo mysql_result($r_TEAMS, $i, 'LOGO'); ?&gt;"/&gt; &lt;p&gt;&lt;?php echo mysql_result($r_TEAMS, $i, 'NAME'); ?&gt;&lt;/p&gt;&lt;/th&gt;
                          &lt;th id="users_th2"&gt;Points Value&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;?php 
                      $q_users = 'Select * from POINTS LEFT JOIN USERS on USERS.UID = POINTS.UID where TID = '.mysql_result($r_TEAMS, $i, 'TID');
                      $r_users = mysql_query($q_users, $connection) or die(mysql_error());
                      $n_users = mysql_num_rows($r_users);
  
                          for($k = 0; $k &lt;$n_users; $k++){    
                      ?&gt;
  
  
  
                      &lt;tr&gt;
                          &lt;td class="person"&gt;&lt;?php echo mysql_result($r_users, $k, 'NAME'); ?&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;?php echo mysql_result($r_users, $k, 'POINTS.PTS'); ?&gt;&lt;/td&gt;
                      &lt;/tr&gt;
  
                      &lt;?php
                          }
                      }
  </code></pre>