sup... i'm doing a ranking with mysql... and now i have a problem. how is the query to get the postition/rank from the playername? thx for help! work now for all who have the same problem, use this query: Code:java SELECT COUNT(*) FROM table WHERE column >= (SELECT column FROM table WHERE name='" + player +"') EDIT by Moderator: merged posts, please use the edit button instead of double posting.
creppii Only if that 'guy with the same problem' has the exact same table and column layout that query will work, so it is not that useful for others.
nlthijs48 That was rather insensitive. It is quite useful to others, SQL is so simple to use that anyone with even a simplistic understanding of SQL Querying can look at that string and tell you what it does. That query could be changed to fit someones specific needs. This is a help forum. People come here for help, if someone comes here and sees a question about SQL queries that they think might apply to them and then see that OP just posted, "nvm solvd lel mod plz dlt lel" they would get rather annoyed. So please, think before post.
acer5999 creppii I'm sorry that I replied in a negative and harsh way, I will try to be more constructive and positive next time. What I should have said is that it would be useful to know a little bit more about the tables and colums that you used in your query, because that could help other people even more. Thank you for posting the solution to your problem in the first place, some people don't do this after fixing a problem on their own.
FabeGabeMC More people use it than what i though lol. (1 Person) I did one which works with PermissionAttachments and Groups (with nodes) etc but it's private to TimelessMC.
Sorry, FabeGabeMC DevRosemberg I was unaware that you had a forum/bukkit account. I starred it on github lol. DevRosemberg EDIT by Moderator: merged posts, please use the edit button instead of double posting.