dagon;10899495 wrote:I asume you want something like:
select id,name ,votes from users order by votes limit 10;
$s = mysql_query(select * from users order by id desc limit 0,10);
$i=0;
while($row = mysql_fetch_assoc($s))
{
$i++;
print $i." ".$row[name]." ".$row[votes];
}
I get results
1. User1 20 votes.
2. User2 16 votes.
3. User3 16 votes
4. User4 15 votes
What I want is
1. User1 20 votes.
2. User2 16 votes. ///this user has 16 votes is number 2
2. User3 16 votes ///this user also has 16 votes so it hase to be number 2
3. User4 15 votes //and then go further
4. User5 12 votes //same story here
4. User6 12 votes //and here
5. User7 10 votes. //
6. User8 9 votes. //
I cannot have LIMIT 0,10 because I dont know how many users have same votes