SirCmpwn

Untitled

May 28th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.26 KB | None | 0 0
  1. SELECT servers.*,users.username AS username,COUNT(votes.id) AS votes
  2. FROM servers
  3. INNER JOIN users ON users.id=servers.user_id  -- To get info on the user that owns this
  4. LEFT JOIN votes ON servers.id=votes.server_id -- To get the vote count
  5. WHERE servers.id=$id
Advertisement
Add Comment
Please, Sign In to add comment