Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT servers.*,users.username AS username,COUNT(votes.id) AS votes
- FROM servers
- INNER JOIN users ON users.id=servers.user_id -- To get info on the user that owns this
- LEFT JOIN votes ON servers.id=votes.server_id -- To get the vote count
- WHERE servers.id=$id
Advertisement
Add Comment
Please, Sign In to add comment