SirCmpwn

Untitled

May 28th, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. SELECT COUNT(votes.id) as votes,servers.id,
  2. @curRow := @curRow + 1 AS row_number
  3. FROM servers LEFT JOIN votes ON votes.server_id=servers.id
  4. JOIN (SELECT @curRow := 0) r
  5. GROUP BY servers.id
  6. ORDER BY votes DESC
Advertisement
Add Comment
Please, Sign In to add comment