title: Calculating rank in PHP/MySQL
body: <p>I've got a table in MySQL lets just say for example its got two fields Username, GameName and Score.
  I want to calculate the rank of a user for an indivudal game name so I could do the query</p>
  
  <pre><code>SELECT * FROM scores WHERE `GameName` = 'Snake' ORDER BY `Score` DESC
  </code></pre>
  
  <p>to get a list of all users in order of highest to lowest and assign a number to each user.</p>
  
  <p>But is there an easier way to get the rank for an indivdual user rather than selecting the entire table as that doesn't seem too efficient.</p>
  
  <p>Thanks</p>