I have a problem assigning position (number) based on the total marks. Here is the code. TQvm for your assistance
the calculation is done perfectly, the ranking is shown correctly but with no numbers, 1, 2 ,3.....
how to set autoincrement for this field (ranking) which is based on the calculation of the sum.
Tq
$sql ="SELECT idPeserta, SUM(JumlahMarkah) AS JumlahKeseluruhan, PurataMarkah,Kedudukan FROM penilaian GROUP BY idPeserta ORDER BY PurataMarkah DESC"; want to assign the rank to 'Kedudukan'