hy,
I was doing some school project and i stacked in this thing i hope i will get the right answer the thing is i was trying to rank one class students and it works but if two students scored the same result it won't give them the same rank i want it to give them the same rank and jump the next rank and get in to process again.
<?php $result = mysql_query("SELECT * FROM score ORDER BY AVERAGE");
$rank= 0; while($go = mysql_fetch_array($result)){$miki = ++$rank;
$sql = mysql_query("INSERT INTO rank(student_id,avg,rank) VALUES('$go['student_id']','$go['avg']','$miki')"); } ?>
it works, it rank but if two students make the same average it won't rank them the same.