SQLite TOP players
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
All can be done in 1 query and you don't need formatting (the query) too. When selecting 1 field, the fieldid would be 0 and not 5.

PHP код:
new rank_info[200], player_name[MAX_PLAYER_NAME], DBResultresult db_query(Database"SELECT `NAME`,`RANK` FROM `USERS` ORDER BY `RANK` DESC limit 10");
for (new 
adb_next_row(result) != 0a++)
{
    
db_get_field(result0player_namesizeof player_name);
    
format(rank_infosizeof(rank_info), "%d. %s - Rank: %d"1player_namedb_get_field_int(result1));
    
// client message
}
db_free_result(result);
// or dialog.. 
Oh thanks, now it's working but doesn't show the higher one from the DB:



I should be the first on the list but I don't appear there :V
Reply


Messages In This Thread
SQLite TOP players - by Ner0x96 - 20.10.2016, 13:09
Re: SQLite TOP players - by Konstantinos - 20.10.2016, 13:21
Re: SQLite TOP players - by Ner0x96 - 20.10.2016, 13:34
Re: SQLite TOP players - by SyS - 20.10.2016, 13:36
Re: SQLite TOP players - by Konstantinos - 20.10.2016, 13:38
Re: SQLite TOP players - by Ner0x96 - 20.10.2016, 13:38
Re: SQLite TOP players - by Konstantinos - 20.10.2016, 13:42
Re: SQLite TOP players - by SyS - 20.10.2016, 13:43
Re: SQLite TOP players - by Ner0x96 - 20.10.2016, 13:48
Re: SQLite TOP players - by Ner0x96 - 21.10.2016, 13:47

Forum Jump:


Users browsing this thread: 1 Guest(s)