This SQL code will give you the rank as column "rank" and works well with partial results, so you always have the right rank even when showing the second page of multiple pages:
SELECT (SELECT COUNT(*) + 1
FROM jss1_prelim ref
WHERE ref.score > main.score) as rank,
id, term, idnumber, subject, score, teacher
FROM jss1_prelim main
ORDER BY score DESC
Make sure to put an index on score
for better performance.