09.09.2011, 12:14
Lets just say that we are doing the top 10 players by score. Your variables are probably not going to be like the following but it's a example
pawn Code:
mysql_query("SELECT score, username FROM usertable ORDER BY score DESC LIMIT 10");
mysql_store_result();
new id;
while(mysql_retrieve_row())
{
id ++;
new username[24], scorevariable[5];
mysql_fetch_field_row(username, "username");
mysql_fetch_field_row(scorevariable, "score");
printf("Position %d: Username - %s | Score: %d", id, username, strval(scorevariable));
}
mysql_free_result();