Ordering list of names in descending order according to their score
#7

If you also need the score, use this:

pawn Код:
new playersScore;
mysql_query("SELECT `AccountName`, `Score` FROM `users` ORDER BY `Score` DESC LIMIT 5");
mysql_store_result();

while(mysql_retrieve_row())
{
    mysql_fetch_row(result);
    sscanf(result, "p<|>s[24]d", result, playersScore);
   
    printf("%s - %d", result, playersScore);
}

mysql_free_result();
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)