Who can help me with the following
i have 5 or more rows in a table the last column is called rank
one row is called points.
I want automatic insert the rank like
when a person has 123 points is rank 1
the second person with 120 point rank 2
the third person with 119 points rank 3
and when a forth or someone else person has the same point like 119 point even he must have rank 3
i have a peace of code but it does not work proper can someone help me
$jaarnu = date('Y', strtotime('now'));
$count = 1;
$query12 = "SELECT * FROM narr_turnier_".$onlyconsonants." WHERE turnier_jaar=".$jaarnu." order by punkten desc";
$result12 = mysql_query($query12) or die(mysql_error());
while($rows12=mysql_fetch_row($result12)){
$updatequeryy = "UPDATE narr_turnier_".$onlyconsonants." SET rang=".$count."
WHERE turnier_jaar=".$jaarnu."";
mysql_query($updatequeryy) or die (mysql_error());
$count++;
}
So as you see i wnt to update always.
Thanks in advice Jo