MySQL BlueGR38
#7

pawn Код:
mysql_tquery(conhandle, "SELECT username, score FROM `table` ORDER BY `score` DESC LIMIT 5", "OnTop5Show", "i", playerid);

public OnTop5Show(playerid) {
    new rows, fields;
    cache_get_data(rows, fields);
    new top[rows][24], score[rows][5]
    for(new i=0;i<rows;i++) {
        cache_get_row(i, 0, top[i]);
        cache_get_row(i, 1, score[i]);
    }
    printf("Rank 1: %s, Rank 2: %s, Rank 3: %s, Rank 4: %s, Rank 5: %s", top[0], top[1], top[2], top[3], top[4], top[5]);
}
Reply


Messages In This Thread
MySQL BlueGR38 - by Mriss - 05.04.2014, 22:07
Re : MySQL BlueGR38 - by MCZOFT - 05.04.2014, 22:19
Re: MySQL BlueGR38 - by Mriss - 05.04.2014, 22:23
Re: MySQL BlueGR38 - by Mriss - 05.04.2014, 22:25
Re: MySQL BlueGR38 - by Mriss - 06.04.2014, 04:28
Re: MySQL BlueGR38 - by VishvaJeet - 06.04.2014, 06:40
Re: MySQL BlueGR38 - by Dubya - 06.04.2014, 07:14

Forum Jump:


Users browsing this thread: 5 Guest(s)