Getting user place from mysql
So how can I get the users place from mysql, by skill descending.
I've got table like: UserAuth__Skill :1:61561___215 :0:47005___57 :1:99824___532 PHP Code:
|
Re: Getting user place from mysql
Sort after getting it? Also you can use sql request with WHERE statement to get what you want.
|
Re: Getting user place from mysql
You can do it with something like this:
PHP Code:
|
Re: Getting user place from mysql
Quote:
|
Re: Getting user place from mysql
Quote:
|
Re: Getting user place from mysql
And what's wrong with this one?
|
Re: Getting user place from mysql
Actually I don't know how to use it properly.
I don't know how to print the result with client_print. Like: Your rank is %d of %d. Right now I've got this: PHP Code:
|
Re: Getting user place from mysql
It won't work with IgnoreHandle. You need to read results like this:
PHP Code:
|
Re: Getting user place from mysql
One more question, How can I retrieve the line number in SQL ?
So it will be like: ....."your rank is %d out of %d", rank, MAX_LINES) And when I write /rank, I've to wait like 2-3 seconds and only then I see the result.. |
Re: Getting user place from mysql
To get amount of rows in table you can use.
PHP Code:
If you want that message to appear instantly, then store rank in some veriable when user enters server and update the value in that variable when it's necessary. Then you can use that variable to display rank instantly. |
| All times are GMT -4. The time now is 19:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.